summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Config.hs49
-rw-r--r--xmobar.config-sample5
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: <fc=#00FF00>%uptime%</fc> ** <fc=#FF0000>%date%</fc>"
}
@@ -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: <usedratio>%"] 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% | <fc=#ee9a00>%mydate% of %year%</fc> %uname%"
+ , template = "%cpu% | %memory% * %swap% | %eth0% - %eth1% | %EGPF% | <fc=#ee9a00>%date%</fc> %uname%"
}