diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Config.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/Config.hs b/src/lib/Config.hs index d9a3084..22b077e 100644 --- a/src/lib/Config.hs +++ b/src/lib/Config.hs @@ -21,6 +21,7 @@ data Palette = Palette { pNormal :: String , pAlpha :: Int , pIconRoot :: String , pIsLight :: Bool + , pWm :: Maybe String } fc color thing = "<fc=" ++ color ++ ">" ++ thing ++ "</fc>" @@ -44,6 +45,7 @@ lightPalette = Palette { pNormal = "#000000" , pAlpha = 229 , pIconRoot = icons "light" , pIsLight = True + , pWm = Nothing } zenburnRed = "#CC9393" @@ -72,12 +74,15 @@ darkPalette = Palette { pNormal = zenburnFg , pAlpha = 255 , pIconRoot = icons "dark" , pIsLight = False + , pWm = Nothing } palette :: IO Palette palette = do light <- lightTheme - if light then return lightPalette else return darkPalette + wm <- lookupEnv "WM" + let p = if light then lightPalette else darkPalette + return $ p {pWm = wm} baseConfig :: Palette -> Config baseConfig p = defaultConfig { |