diff options
author | jao <jao@gnu.org> | 2019-11-06 17:07:33 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2019-11-06 17:07:33 +0000 |
commit | c8eaf7495e74b55f125455f58cd4872ae5022af4 (patch) | |
tree | 6d7e4916ea6395bd3f0a2db6b3cd1374dfe7225f /src/lib/Config.hs | |
parent | 68f2f5fc251c611c3848c0810fd303e655860038 (diff) | |
download | xmobar-config-c8eaf7495e74b55f125455f58cd4872ae5022af4.tar.gz xmobar-config-c8eaf7495e74b55f125455f58cd4872ae5022af4.tar.bz2 |
Playing with colors
Diffstat (limited to 'src/lib/Config.hs')
-rw-r--r-- | src/lib/Config.hs | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/src/lib/Config.hs b/src/lib/Config.hs index 59d9f3d..119a4e5 100644 --- a/src/lib/Config.hs +++ b/src/lib/Config.hs @@ -1,4 +1,5 @@ -module Config (Palette(..), baseConfig, palette, (<~>), mkArgs, defaultHeight) +module Config ( + Palette(..), baseConfig, palette, (<~>), (>~<), mkArgs, defaultHeight) where import System.Environment (lookupEnv) @@ -23,6 +24,8 @@ data Palette = Palette { pNormal :: String lightTheme :: IO Bool lightTheme = fmap (== (Just "light")) (lookupEnv "JAO_COLOR_SCHEME") +icons k = "/home/jao/.config/xmobar/icons/" ++ k + lightPalette :: Palette lightPalette = Palette { pNormal = "black" , pLow = "#4d4d4d" @@ -32,21 +35,28 @@ lightPalette = Palette { pNormal = "black" , pForeground = "#000000" , pBackground = "white" , pAlpha = 255 - , pIconRoot = "/home/jao/.xmobar/icons/light" + , pIconRoot = icons "light" , pIsLight = True } +zenburnRed = "#CC9393" +zenburnBack = "#2B2B2B" +zenburnBackLight = "#383838" +zenburnFg = "#DCDCCC" +zenburnYl = "#F0DFAF" +zenburnGreen = "#7F9F7F" + darkPalette :: Palette -darkPalette = Palette { pNormal = "gray77" - , pLow = "gray60" - , pHigh = "#a0522d" +darkPalette = Palette { pNormal = zenburnFg + , pLow = zenburnGreen + , pHigh = zenburnRed , pFont = "xft:Source Code Pro Medium-9" -- , pFont = "xft:NotoMono-9,xft:Inconsolata-11" - , pBorder = "grey30" - , pForeground = "grey77" -- "grey60" - , pBackground = "#2B2B2B" -- "black" + , pBorder = zenburnBackLight + , pForeground = zenburnFg + , pBackground = zenburnBack , pAlpha = 255 - , pIconRoot = "/home/jao/.xmobar/icons/dark" + , pIconRoot = icons "dark" , pIsLight = False } @@ -86,5 +96,13 @@ baseConfig p = defaultConfig { ] ] +(>~<) :: Palette -> [String] -> [String] +(>~<) p args = concat [ args + , [ "--low", (pHigh p) + , "--normal", (pNormal p) + , "--high", (pLow p) + ] + ] + mkArgs :: Palette -> [String] -> [String] -> [String] mkArgs p args extra = concat [(p <~> args), ["--"], extra] |