diff options
author | Don Stewart <dons@galois.com> | 2007-11-07 19:31:07 +0100 |
---|---|---|
committer | Don Stewart <dons@galois.com> | 2007-11-07 19:31:07 +0100 |
commit | 9c464f9fa63a8fa81f095fad170fc23c17ec5f62 (patch) | |
tree | 8a4947fec1d6ff14ad58cf0b8020ca71d20267ba /XMonad/Hooks | |
parent | e76fbd619d605590257e4857741dc09638a77070 (diff) | |
download | XMonadContrib-9c464f9fa63a8fa81f095fad170fc23c17ec5f62.tar.gz XMonadContrib-9c464f9fa63a8fa81f095fad170fc23c17ec5f62.tar.xz XMonadContrib-9c464f9fa63a8fa81f095fad170fc23c17ec5f62.zip |
add higher order 'dzen' function
The intent is that:
main
darcs-hash:20071107183107-cba2c-9b30182c82b98ccb2bf41f7c574946cbcb1be95f.gz
Diffstat (limited to 'XMonad/Hooks')
-rw-r--r-- | XMonad/Hooks/DynamicLog.hs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/XMonad/Hooks/DynamicLog.hs b/XMonad/Hooks/DynamicLog.hs index 02fa34d..2164080 100644 --- a/XMonad/Hooks/DynamicLog.hs +++ b/XMonad/Hooks/DynamicLog.hs @@ -25,6 +25,7 @@ module XMonad.Hooks.DynamicLog ( dynamicLogDzen, dynamicLogWithPP, dynamicLogXinerama, + dzen, pprWindowSet, pprWindowSetXinerama, @@ -67,9 +68,31 @@ makeSimpleDzenConfig = do h <- spawnPipe "dzen2" return defaultConfig { defaultGaps = [(18,0,0,0)] - , logHook = dynamicLogWithPP defaultPP + , logHook = dynamicLogWithPP dzenPP { ppOutput = hPutStrLn h } } +-- | +-- +-- Run xmonad with a dzen status bar set to some nice defaults. Output +-- it taken fromthe dynamicLogWithPP hook. +-- +-- > main = dzen xmonad +-- +-- The intent is that the avove config file should provide a nice status +-- bar with minimal effort. +-- +dzen :: (XConfig -> IO ()) -> IO () +dzen f = do + h <- spawnPipe ("dzen2" ++ " " ++ flags) + f $ defaultConfig + { defaultGaps = [(18,0,0,0)] + , logHook = dynamicLogWithPP dzenPP + { ppOutput = hPutStrLn h } } + where + fg = "'#a8a3f7'" -- n.b quoting + bg = "'#3f3c6d'" + flags = "-e '' -w 400 -ta l -fg " ++ fg ++ " -bg " ++ bg + -- | -- An example log hook, print a status bar output to stdout, in the form: -- |