summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2007-07-12 20:04:34 +0200
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2007-07-12 20:04:34 +0200
commit6c8658883e39c0692d188c22e5b148319247a8c1 (patch)
treec905809c02c1e8cc8745862465a2ecdeb0db215e
parentf5bbeb3242ea5dc0a471abb557dabc726ffe8877 (diff)
downloadxmobar-6c8658883e39c0692d188c22e5b148319247a8c1.tar.gz
xmobar-6c8658883e39c0692d188c22e5b148319247a8c1.tar.bz2
added a plugin example with the needed runtime configuration file
darcs-hash:20070712180434-d6583-99f6807f0deb0141014593f27356a69e69305d0e.gz
-rw-r--r--Plugins/HelloWorld.hs25
-rw-r--r--Plugins/helloworld.config17
2 files changed, 42 insertions, 0 deletions
diff --git a/Plugins/HelloWorld.hs b/Plugins/HelloWorld.hs
new file mode 100644
index 0000000..2b52506
--- /dev/null
+++ b/Plugins/HelloWorld.hs
@@ -0,0 +1,25 @@
+-----------------------------------------------------------------------------
+-- |
+-- Module : Plugins.HelloWorld
+-- Copyright : (c) Andrea Rossato
+-- License : BSD-style (see LICENSE)
+--
+-- Maintainer : Andrea Rossato <andrea.rossato@unibz.it>
+-- Stability : unstable
+-- Portability : unportable
+--
+-- A plugin example for XMobar, a status bar for the Xmonad Window Manager
+--
+-----------------------------------------------------------------------------
+
+module Plugins.HelloWorld where
+
+import Commands
+
+data Plugin = HelloWorld
+ deriving (Show, Read)
+
+instance Exec Plugin where
+ run HelloWorld = return "<fc=red>Hello World!!</fc>"
+ rate HelloWorld = 1000
+ alias HelloWorld = "helloWorld"
diff --git a/Plugins/helloworld.config b/Plugins/helloworld.config
new file mode 100644
index 0000000..1cf3963
--- /dev/null
+++ b/Plugins/helloworld.config
@@ -0,0 +1,17 @@
+Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
+ , bgColor = "#000000"
+ , fgColor = "#BFBFBF"
+ , xPos = 0
+ , yPos = 0
+ , width = 1024
+ , height = 15
+ , align = "right"
+ , refresh = 10
+ , commands = [ Run Cpu [] 10
+ , Run Weather "LIPB" [] 36000
+ , Run Battery [] 10
+ , Run HelloWorld
+ ]
+ , sepChar = "%"
+ , template = "%cpu% | %helloWorld% | %LIPB% | <fc=yellow>%date%</fc> | %battery%"
+ }