summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2008-03-16 13:28:05 +0100
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2008-03-16 13:28:05 +0100
commitd777ba363bd49f6c2839979b2a49921632039e50 (patch)
tree4606ece46011ec678f0e85b78ce16b8ade8379af
parent5b753d8c1aa2ce271fb15b7c9aa1af83f8de0d3a (diff)
downloadxmobar-d777ba363bd49f6c2839979b2a49921632039e50.tar.gz
xmobar-d777ba363bd49f6c2839979b2a49921632039e50.tar.bz2
Config: use more xmonad friendly defaults
darcs-hash:20080316122805-d6583-f33ffaf058a7b3945e2987ffc2dbad233c1a25b1.gz
-rw-r--r--Config.hs16
1 files 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 <andrea.rossato@unibz.it>
-- 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: <fc=#00FF00>%uptime%</fc> }{ <fc=#FF0000>%date%</fc>"
+ , template = "%StdinReader% }{ <fc=#00FF00>%uname%</fc> * <fc=#FF0000>%theDate%</fc>"
}
-- | This is the list of types that can be hidden inside