From d777ba363bd49f6c2839979b2a49921632039e50 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Sun, 16 Mar 2008 13:28:05 +0100 Subject: Config: use more xmonad friendly defaults darcs-hash:20080316122805-d6583-f33ffaf058a7b3945e2987ffc2dbad233c1a25b1.gz --- Config.hs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Config.hs b/Config.hs index 4a566c6..a1e6a2b 100644 --- a/Config.hs +++ b/Config.hs @@ -3,12 +3,12 @@ -- Module : Xmobar.Config -- Copyright : (c) Andrea Rossato -- License : BSD-style (see LICENSE) --- +-- -- Maintainer : Andrea Rossato -- Stability : unstable -- Portability : unportable -- --- The configuration module of Xmobar, a text based status bar +-- The configuration module of Xmobar, a text based status bar -- ----------------------------------------------------------------------------- @@ -31,17 +31,17 @@ import Plugins.StdinReader -- Configuration data type and default configuration -- | The configuration data type -data Config = +data Config = Config { font :: String -- ^ Font , bgColor :: String -- ^ Backgroud color , fgColor :: String -- ^ Default font color , position :: XPosition -- ^ Top Bottom or Static - , commands :: [Runnable] -- ^ For setting the command, the command argujments + , commands :: [Runnable] -- ^ 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 '%') , alignSep :: String -- ^ Separators for left, center and right text alignment - , template :: String -- ^ The output template + , template :: String -- ^ The output template } deriving (Read) data XPosition = Top | TopW Align Int | Bottom | BottomW Align Int | Static {xpos, ypos, width, height :: Int} deriving ( Read, Eq ) @@ -55,10 +55,12 @@ defaultConfig = , bgColor = "#000000" , fgColor = "#BFBFBF" , position = Top - , commands = [] + , commands = [ Run $ Date "%a %b %_d %Y * %H:%M:%S" "theDate" 10 + , Run StdinReader + ] , sepChar = "%" , alignSep = "}{" - , template = "Uptime: %uptime% }{ %date%" + , template = "%StdinReader% }{ %uname% * %theDate%" } -- | This is the list of types that can be hidden inside -- cgit v1.2.3