diff options
author | azahi <azahi@teknik.io> | 2018-06-12 22:59:58 +0300 |
---|---|---|
committer | azahi <azahi@teknik.io> | 2018-06-12 22:59:58 +0300 |
commit | b975c0a90dce97c8d96ab464d69575a9d8c150b3 (patch) | |
tree | 714936c56a45e1142347d763e01984f5db881fbf /src/XMonad/Custom/Theme.hs | |
parent | Add Stack integration (diff) |
Add X.Custom and split existing code in modules
Diffstat (limited to 'src/XMonad/Custom/Theme.hs')
-rw-r--r-- | src/XMonad/Custom/Theme.hs | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/src/XMonad/Custom/Theme.hs b/src/XMonad/Custom/Theme.hs new file mode 100644 index 0000000..50fa398 --- /dev/null +++ b/src/XMonad/Custom/Theme.hs @@ -0,0 +1,123 @@ +module XMonad.Custom.Theme + ( font + , black1 + , black2 + , red1 + , red2 + , green1 + , green2 + , yellow1 + , yellow2 + , blue1 + , blue2 + , magenta1 + , magenta2 + , cyan1 + , cyan2 + , white1 + , white2 + , colorN + , colorF + , gapBase + , gapFull + , border + , tabTheme + , promptTheme + , hotPromptTheme + ) where + +import Data.Char +import Data.Function +import Data.List +import Graphics.X11.Xlib.Types +import XMonad.Layout.Decoration +import qualified XMonad.Prompt as P + +font :: String +font = "xft:lucy tewi:style=Regular:size=8" -- TODO CJKのフォールバックフォントを追加する + +black1, black2 :: String -- TODO get variables from Xresources +(black1, black2) = + ("#0b0806", "#2f2b2a") + +-- | Red +red1, red2 :: String +(red1, red2) = + ("#844d2c", "#a64848") + +-- | Green +green1, green2 :: String +(green1, green2) = + ("#57553a", "#897f5a") + +-- | Yellow +yellow1, yellow2 :: String +(yellow1, yellow2) = + ("#a17c38", "#c8b38d") + +-- | Blue +blue1, blue2 :: String +(blue1, blue2) = + ("#41434f", "#526274") + +-- | Magenta +magenta1, magenta2 :: String +(magenta1, magenta2) = + ("#6b4444", "#755c47") + +-- | Cyan +cyan1, cyan2 :: String +(cyan1, cyan2) = + ("#59664c", "#718062") + +-- | White +white1, white2 :: String +(white1, white2) = + ("#a19782", "#c1ab83") + +colorN, colorF :: String +colorN = black2 +colorF = white2 + +gapBase, gapFull :: Int +gapBase = 12 +gapFull = gapBase * 2 + +height, border :: Dimension +height = 12 * 2 +border = 1 + +tabTheme :: Theme +tabTheme = def + { activeColor = black1 + , inactiveColor = black2 + , urgentColor = red1 + , activeBorderColor = white1 + , inactiveBorderColor = white2 + , urgentBorderColor = red2 + , activeTextColor = white1 + , inactiveTextColor = white2 + , urgentTextColor = red2 + , fontName = font + , decoHeight = height + } + +promptTheme, hotPromptTheme :: P.XPConfig +promptTheme = def + { P.font = font + , P.bgColor = black1 + , P.fgColor = white1 + , P.fgHLight = white2 + , P.bgHLight = black2 + , P.borderColor = white2 + , P.promptBorderWidth = border + , P.position = P.Bottom + , P.height = height + , P.searchPredicate = isInfixOf `on` map toLower + } +hotPromptTheme = promptTheme + { P.bgColor = black2 + , P.fgColor = white2 + , P.fgHLight = white1 + , P.bgHLight = black1 + } |