From da006d8a396e7b755c3c1dd8281fb7d2fa7b84ae Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Fri, 9 Jan 2015 10:57:41 +0600 Subject: Change the `fontList` to `additionalFonts` --- readme.md | 4 ++-- src/Config.hs | 4 ++-- src/Main.hs | 2 +- src/Parsers.hs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index 3db4955..3ca3a7e 100644 --- a/readme.md +++ b/readme.md @@ -198,7 +198,7 @@ For the output template: - `string` will print `string` with `#FF0000` color (red). -- `string` will print `string` with the first font from `fontList`. +- `string` will print `string` with the first font from `additionalFonts`. The index `0` corresponds to the standard font. - `` will insert the given bitmap. XPM image @@ -230,7 +230,7 @@ Other configuration options: `font` : Name of the font to be used. Use the `xft:` prefix for XFT fonts. -`fontList` +`additionalFonts` : Haskell-style list of fonts to be used with the `fn`-template. Use the `xft:` prefix for XFT fonts. diff --git a/src/Config.hs b/src/Config.hs index 7929011..59d6bd4 100644 --- a/src/Config.hs +++ b/src/Config.hs @@ -49,7 +49,7 @@ import Plugins.DateZone -- | The configuration data type data Config = Config { font :: String -- ^ Font - , fontList :: [String] -- ^ List of alternative fonts + , additionalFonts :: [String] -- ^ List of alternative fonts , bgColor :: String -- ^ Backgroud color , fgColor :: String -- ^ Default font color , position :: XPosition -- ^ Top Bottom or Static @@ -111,7 +111,7 @@ data Border = NoBorder defaultConfig :: Config defaultConfig = Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" - , fontList = [] + , additionalFonts = [] , bgColor = "#000000" , fgColor = "#BFBFBF" , alpha = 255 diff --git a/src/Main.hs b/src/Main.hs index 0eca0cb..209eee1 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -59,7 +59,7 @@ main = do conf <- doOpts c o fs <- initFont d (font conf) - fl <- mapM (initFont d) (fontList conf) + fl <- mapM (initFont d) (additionalFonts conf) cls <- mapM (parseTemplate conf) (splitTemplate conf) sig <- setupSignalHandler vars <- mapM (mapM $ startCommand sig) cls diff --git a/src/Parsers.hs b/src/Parsers.hs index 59a1dc7..25d215b 100644 --- a/src/Parsers.hs +++ b/src/Parsers.hs @@ -220,7 +220,7 @@ parseConfig = runParser parseConf fields "Config" . stripComments <|?> pCommands <|?> pSepChar <|?> pAlignSep <|?> pTemplate - fields = [ "font", "fontList","bgColor", "fgColor", "sepChar" + fields = [ "font", "additionalFonts","bgColor", "fgColor", "sepChar" , "alignSep" , "border", "borderColor" ,"template" , "position" , "textOffset", "iconOffset" , "allDesktops", "overrideRedirect", "pickBroadest" @@ -229,7 +229,7 @@ parseConfig = runParser parseConf fields "Config" . stripComments ] pFont = strField font "font" - pFontList = strListField fontList "fontList" + pFontList = strListField additionalFonts "additionalFonts" pBgColor = strField bgColor "bgColor" pFgColor = strField fgColor "fgColor" pBdColor = strField borderColor "borderColor" -- cgit v1.2.3