From f21e573cd3f73796f3e8a826cabb37269e97a111 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Sun, 8 Jul 2007 12:14:30 +0200 Subject: updated configurations to reflect code changes darcs-hash:20070708101430-d6583-f58cc8c24166a2619b7712229da8e8343a8a4ea5.gz --- Config.hs | 18 +++++++++--------- xmobar.config-sample | 13 +++++++++++-- 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: %uptime% ** %date%" + , template = "Uptime: %uptime% ** %date% %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",": 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: %"], 10) + , (Swap [], 10) + , (Exec "uname" ["-s","-r"] "", 36000) + ] , sepChar = "%" - , template = "%xmb-cpu% | %xmb-mem% * %xmb-swap% | %xmb-net% | %xmb-weather% | %date%" + , template = "%cpu% | %memory% * %swap% | %eth0% - %eth1% | %EGPF% | %mydate% of %year% %uname%" } -- cgit v1.2.3