From ef2e760922b334b1736a896fa5d947cda2d8fccb Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Sat, 15 Sep 2007 18:36:33 +0200 Subject: Added Date to default config darcs-hash:20070915163633-d6583-b61b6e05ae604b24015dacd61510f650c4c6dee1.gz --- Config.hs | 49 +++++++++++++++++++++++++------------------------ xmobar.config-sample | 5 ++--- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Config.hs b/Config.hs index a9e7bb6..f13f39f 100644 --- a/Config.hs +++ b/Config.hs @@ -22,42 +22,43 @@ module Config ( -- * Configuration import Commands import {-# SOURCE #-} Runnable import Plugins.Monitors +import Plugins.Date -- $config -- Configuration data type and default configuration -- | The configuration data type data Config = - Config { font :: String -- ^ Font - , bgColor :: String -- ^ Backgroud color - , fgColor :: String -- ^ Default font color - , xPos :: Int -- ^ x Window position (origin in the upper left corner) - , yPos :: Int -- ^ y Window position - , width :: Int -- ^ Window width - , height :: Int -- ^ Window height - , align :: String -- ^ text alignment - , refresh :: Int -- ^ Refresh rate in tenth of seconds + Config { font :: String -- ^ Font + , bgColor :: String -- ^ Backgroud color + , fgColor :: String -- ^ Default font color + , xPos :: Int -- ^ x Window position (origin in the upper left corner) + , yPos :: Int -- ^ y Window position + , width :: Int -- ^ Window width + , height :: Int -- ^ Window height + , align :: String -- ^ text alignment + , refresh :: Int -- ^ Refresh rate in tenth of seconds , 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 '%') - , template :: String -- ^ The output template + -- 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 defaultConfig = - Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" - , bgColor = "#000000" - , fgColor = "#BFBFBF" - , xPos = 0 - , yPos = 0 - , width = 1024 - , height = 15 - , align = "left" - , refresh = 10 + Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" + , bgColor = "#000000" + , fgColor = "#BFBFBF" + , xPos = 0 + , yPos = 0 + , width = 1024 + , height = 15 + , align = "left" + , refresh = 10 , commands = [] - , sepChar = "%" + , sepChar = "%" , template = "Uptime: %uptime% ** %date%" } @@ -67,5 +68,5 @@ defaultConfig = -- the 'Runnable.Runnable' Read instance. To install a plugin just add -- the plugin's type to the list of types appearing in this function's type -- signature. -runnableTypes :: (Command,(Monitors,())) +runnableTypes :: (Command,(Monitors,(Date,()))) runnableTypes = undefined diff --git a/xmobar.config-sample b/xmobar.config-sample index 3092cbc..b705877 100644 --- a/xmobar.config-sample +++ b/xmobar.config-sample @@ -11,12 +11,11 @@ Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" , Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10 , Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10 , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 - , Run Com "date" ["+\"%a %b %_d %H:%M\""] "mydate" 600 - , Run Com "date" ["+%Y"] "year" 304128000 , Run Memory ["-t","Mem: %"] 10 , Run Swap [] 10 , Run Com "uname" ["-s","-r"] "" 36000 + , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10 ] , sepChar = "%" - , template = "%cpu% | %memory% * %swap% | %eth0% - %eth1% | %EGPF% | %mydate% of %year% %uname%" + , template = "%cpu% | %memory% * %swap% | %eth0% - %eth1% | %EGPF% | %date% %uname%" } -- cgit v1.2.3