From bae6a18dca04f04a3af6b4cdd18a1c11bc2be270 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Sun, 28 Oct 2007 13:36:38 +0100 Subject: 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 --- Config.hs | 13 +++++-------- 1 file 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 = "%" -- cgit v1.2.3