summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Config.hs18
-rw-r--r--xmobar.config-sample13
2 files changed, 20 insertions, 11 deletions
diff --git a/Config.hs b/Config.hs
index 60ca3b0..1ab01c9 100644
--- a/Config.hs
+++ b/Config.hs
@@ -18,6 +18,7 @@ module Config ( -- * Configuration
, defaultConfig
) where
+import Commands
-- $config
-- Configuration data type and default configuration
@@ -32,12 +33,12 @@ data Config =
, height :: Int -- ^ Window height
, align :: String -- ^ text alignment
, refresh :: Int -- ^ Refresh rate in tenth of seconds
- , commands :: [(String, Int, [String])] -- ^ For setting the refresh rate and
- -- options for the programs to run (optional)
- , sepChar :: String -- ^ The character to be used for indicating
- -- commands in the output template (default '%')
- , template :: String -- ^ The output template
- } deriving (Eq, Show, Read, Ord)
+ , commands :: [(Command,Int)] -- ^ For setting the command, the command argujments
+ -- and refresh rate for the programs to run (optional)
+ , sepChar :: String -- ^ The character to be used for indicating
+ -- commands in the output template (default '%')
+ , template :: String -- ^ The output template
+ } deriving (Read)
-- | The default configuration values
defaultConfig :: Config
@@ -51,8 +52,7 @@ defaultConfig =
, height = 15
, align = "left"
, refresh = 10
- , commands = [("date", 10, [])]
+ , commands = [(Memory [],10)]
, sepChar = "%"
- , template = "Uptime: <fc=#00FF00>%uptime%</fc> ** <fc=#FF0000>%date%</fc>"
+ , template = "Uptime: <fc=#00FF00>%uptime%</fc> ** <fc=#FF0000>%date%</fc> %memory%"
}
-
diff --git a/xmobar.config-sample b/xmobar.config-sample
index 5d01a82..8324538 100644
--- a/xmobar.config-sample
+++ b/xmobar.config-sample
@@ -7,7 +7,16 @@ Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
, height = 15
, align = "right"
, refresh = 10
- , commands = [("xmb-weather", 36000, ["EGPF"]), ("xmb-net", 10, ["eth0"])]
+ , commands = [ (Weather "EGPF" ["-t","<station>: <tempC>C"], 36000)
+ , (Network "eth0" [], 10)
+ , (Network "eth1" [], 10)
+ , (Cpu [], 10)
+ , (Exec "date" ["+\"%a %b %_d %H:%M\""] "mydate", 600)
+ , (Exec "date" ["+%Y"] "year", 304128000)
+ , (Memory ["-t","Mem: <usedratio>%"], 10)
+ , (Swap [], 10)
+ , (Exec "uname" ["-s","-r"] "", 36000)
+ ]
, sepChar = "%"
- , template = "%xmb-cpu% | %xmb-mem% * %xmb-swap% | %xmb-net% | %xmb-weather% | <fc=#ee9a00>%date%</fc>"
+ , template = "%cpu% | %memory% * %swap% | %eth0% - %eth1% | %EGPF% | <fc=#ee9a00>%mydate% of %year%</fc> %uname%"
}