diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2008-10-08 07:00:09 +0200 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2008-10-08 07:00:09 +0200 |
commit | de2d739902f4539ac4de10d3a9799124c6831559 (patch) | |
tree | ea5dc0b59d2275c856edd581b500953a1976851a | |
parent | 69cb7f23b65f42410b5463ac6b4d87985237b4eb (diff) | |
download | xmobar-de2d739902f4539ac4de10d3a9799124c6831559.tar.gz xmobar-de2d739902f4539ac4de10d3a9799124c6831559.tar.bz2 |
Make lowerOnStart configurable. Note this breaks config backwards compatibility
darcs-hash:20081008050009-a5988-acb5cda2e3692295abf0bc967acc23e54b55068c.gz
-rw-r--r-- | Config.hs | 3 | ||||
-rw-r--r-- | Xmobar.hs | 2 | ||||
-rw-r--r-- | xmobar.config-sample | 1 |
3 files changed, 5 insertions, 1 deletions
@@ -44,6 +44,8 @@ data Config = , bgColor :: String -- ^ Backgroud color , fgColor :: String -- ^ Default font color , position :: XPosition -- ^ Top Bottom or Static + , lowerOnStart :: Bool -- ^ Lower to the bottom of the + -- window stack on initialization , commands :: [Runnable] -- ^ For setting the command, the command arguments -- and refresh rate for the programs to run (optional) , sepChar :: String -- ^ The character to be used for indicating @@ -69,6 +71,7 @@ defaultConfig = , bgColor = "#000000" , fgColor = "#BFBFBF" , position = Top + , lowerOnStart = True , commands = [ Run $ Date "%a %b %_d %Y * %H:%M:%S" "theDate" 10 , Run StdinReader] , sepChar = "%" @@ -135,7 +135,7 @@ createWin d fs c = do win <- newWindow d (defaultScreenOfDisplay d) rootw r o selectInput d win (exposureMask .|. structureNotifyMask) setProperties r c d win srs - lowerWindow d win + when (lowerOnStart c) (lowerWindow d win) mapWindow d win return (r,win) diff --git a/xmobar.config-sample b/xmobar.config-sample index 77f0b1f..b061459 100644 --- a/xmobar.config-sample +++ b/xmobar.config-sample @@ -2,6 +2,7 @@ Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" , bgColor = "black" , fgColor = "grey" , position = Top + , lowerOnStart = True , commands = [ Run Weather "EGPF" ["-t","<station>: <tempC>C","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 36000 , Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10 , Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10 |