From 31a5a5821b8a313823e47001d473a711bccb0914 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Sun, 4 Nov 2007 18:45:51 +0100 Subject: A new implementation of the position configuration option WARNING: this patch breaks previous configuration files. A new implementation of the position configuration option: - Top and Bottom have non arguments - TopW and BottomW have now 2 arguments: Align (L, C or R) and Int - setting a width % greater than 100 means a 100% width darcs-hash:20071104174551-d6583-adff505bf3929926554595180b8da1c7a0f9d0a5.gz --- Config.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Config.hs') diff --git a/Config.hs b/Config.hs index aff4db6..4a566c6 100644 --- a/Config.hs +++ b/Config.hs @@ -15,7 +15,7 @@ module Config ( -- * Configuration -- $config Config (..) - , XPosition (..), Width (..) + , XPosition (..), Align (..) , defaultConfig , runnableTypes ) where @@ -44,8 +44,9 @@ data Config = , template :: String -- ^ The output template } deriving (Read) -data XPosition = Top | TopW Width | Bottom | BottomW Width | Static {xpos, ypos, width, height :: Int} deriving ( Read, Eq ) -data Width = L Int | R Int | C Int deriving ( Read, Eq ) +data XPosition = Top | TopW Align Int | Bottom | BottomW Align Int | Static {xpos, ypos, width, height :: Int} deriving ( Read, Eq ) + +data Align = L | R | C deriving ( Read, Eq ) -- | The default configuration values defaultConfig :: Config -- cgit v1.2.3