diff options
author | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2007-06-26 13:39:48 +0200 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2007-06-26 13:39:48 +0200 |
commit | a8ffb9f53aac66b31d4ef870ed88b7c0e6e5ca7e (patch) | |
tree | 358cae8830782791a31437eeb4dfad8286e52d83 /Config.hs | |
parent | 45ae401703267ec7618ab1315ce5b38af1756c33 (diff) | |
download | xmobar-a8ffb9f53aac66b31d4ef870ed88b7c0e6e5ca7e.tar.gz xmobar-a8ffb9f53aac66b31d4ef870ed88b7c0e6e5ca7e.tar.bz2 |
splitted files
darcs-hash:20070626113948-d6583-73d318293d1cd91894589450e5cd270dd39bdc02.gz
Diffstat (limited to 'Config.hs')
-rw-r--r-- | Config.hs | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Config.hs b/Config.hs new file mode 100644 index 0000000..8672f26 --- /dev/null +++ b/Config.hs @@ -0,0 +1,58 @@ +----------------------------------------------------------------------------- +-- | +-- Module : XMobar.Config +-- Copyright : (c) Andrea Rossato +-- License : BSD-style (see LICENSE) +-- +-- Maintainer : Andrea Rossato <andrea.rossato@unibz.it> +-- Stability : unstable +-- Portability : unportable +-- +-- The configuration module of XMobar, a status bar for the Xmonad Window Manager +-- +----------------------------------------------------------------------------- + +module Config ( -- * Configuration + -- $config + Config (..) + , defaultConfig + ) where + +-- $config +-- Configuration data type and default configuration + +-- | The configuration data type +data Config = + Config { fonts :: String -- ^ Fonts + , 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 + , hight :: Int -- ^ Window hight + , align :: String -- ^ text alignment + , refresh :: Int -- ^ Refresh rate in tenth of seconds + , commands :: [(String, Int, [String])] -- ^ For setting the refresh rate and + -- options for the programs to run (optionals) + , sepChar :: String -- ^ The character to be used for indicating + -- commands in the output template (default '%') + , template :: String -- ^ The output template + } deriving (Eq, Show, Read, Ord) + +-- | The default configuration values +defaultConfig :: Config +defaultConfig = + Config { fonts = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" + , bgColor = "#000000" + , fgColor = "#BFBFBF" + , xPos = 0 + , yPos = 0 + , width = 1024 + , hight = 15 + , align = "left" + , refresh = 10 + , commands = [("date", 10, [])] + , sepChar = "%" + , template = "Uptime: <fc=#00FF00>%uptime%</fc> ** <fc=#FF0000>%date%</fc>" + } + |