Created
January 27, 2013 06:33
-
-
Save victoredwardocallaghan/4646982 to your computer and use it in GitHub Desktop.
bitmap icon path support idea.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Config.hs b/src/Config.hs | |
index 6ab3f8d..9449250 100644 | |
--- a/src/Config.hs | |
+++ b/src/Config.hs | |
@@ -52,6 +52,7 @@ import Plugins.DateZone | |
-- | The configuration data type | |
data Config = | |
Config { font :: String -- ^ Font | |
+ , bitMaps :: String -- ^ Bitmap file path | |
, bgColor :: String -- ^ Backgroud color | |
, fgColor :: String -- ^ Default font color | |
, position :: XPosition -- ^ Top Bottom or Static | |
@@ -98,6 +99,7 @@ data Border = NoBorder | |
defaultConfig :: Config | |
defaultConfig = | |
Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" | |
+ , bitMaps = "~/.xmonad/bitmaps" | |
, bgColor = "#000000" | |
, fgColor = "#BFBFBF" | |
, position = Top | |
diff --git a/src/Parsers.hs b/src/Parsers.hs | |
index 4703733..0094ef7 100644 | |
--- a/src/Parsers.hs | |
+++ b/src/Parsers.hs | |
@@ -148,14 +148,15 @@ parseConfig = runParser parseConf fields "Config" . stripComments | |
<|?> pHideOnStart <|?> pLowerOnStart | |
<|?> pPersistent <|?> pCommands | |
<|?> pSepChar <|?> pAlignSep | |
- <|?> pTemplate | |
+ <|?> pTemplate <|?> pBitMaps | |
- fields = [ "font", "bgColor", "fgColor", "sepChar", "alignSep" | |
+ fields = [ "font", "bitMaps", "bgColor", "fgColor", "sepChar", "alignSep" | |
, "border", "borderColor" ,"template", "position" | |
, "hideOnStart", "lowerOnStart", "persistent", "commands" | |
] | |
pFont = strField font "font" | |
+ pBitMaps = strField bitMaps "bitMaps" | |
pBgColor = strField bgColor "bgColor" | |
pFgColor = strField fgColor "fgColor" | |
pBdColor = strField borderColor "borderColor" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment