summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2007-10-28 13:36:38 +0100
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2007-10-28 13:36:38 +0100
commitbae6a18dca04f04a3af6b4cdd18a1c11bc2be270 (patch)
tree6521eeddbd39d884951343848c3614700f89ade3
parentf837dd93a4fc902b7d763a76d7bdc95da5dcdaee (diff)
downloadxmobar-bae6a18dca04f04a3af6b4cdd18a1c11bc2be270.tar.gz
xmobar-bae6a18dca04f04a3af6b4cdd18a1c11bc2be270.tar.bz2
Removed xPos yPos width and height configuration option and added position
WARNING: this patch breaks old configuration files: - removed xPos, yPos, width and height - a "position" configuration option has been added: this can be set to: Top Bottom Static {xpos darcs-hash:20071028123638-d6583-46fce0bad4212d5fe23067eb3c7d7f8314dae015.gz
-rw-r--r--Config.hs13
1 files changed, 5 insertions, 8 deletions
diff --git a/Config.hs b/Config.hs
index 478145f..acc8014 100644
--- a/Config.hs
+++ b/Config.hs
@@ -15,6 +15,7 @@
module Config ( -- * Configuration
-- $config
Config (..)
+ , XPosition (..)
, defaultConfig
, runnableTypes
) where
@@ -34,10 +35,7 @@ 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
+ , position :: XPosition -- ^ Top Bottom or Static
, align :: String -- ^ text alignment
, commands :: [Runnable] -- ^ For setting the command, the command argujments
-- and refresh rate for the programs to run (optional)
@@ -46,16 +44,15 @@ data Config =
, template :: String -- ^ The output template
} deriving (Read)
+data XPosition = Top | Bottom | Static {xpos, ypos, width, height :: Int} deriving ( Read, Eq )
+
-- | The default configuration values
defaultConfig :: Config
defaultConfig =
Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
, bgColor = "#000000"
, fgColor = "#BFBFBF"
- , xPos = 0
- , yPos = 0
- , width = 1024
- , height = 15
+ , position = Top
, align = "left"
, commands = []
, sepChar = "%"