nix-configs/haskell/xmobar/xmobar.hs

27 lines
723 B
Haskell

import Xmobar
fc code content = "<fc=" ++ code ++ ">" ++ content ++ "</fc>"
sep = fc "#7c6f64"
icon = fc "#d65d0e"
config :: Config
config =
defaultConfig
{ font = "FiraCode Nerd Font",
allDesktops = True,
alpha = 255,
bgColor = "#282828",
fgColor = "#ebdbb2",
commands =
[ Run $ Memory ["t", "Mem: <usedratio>%"] 10,
Run $ Kbd [],
Run $ Date (icon "\983277" ++ " %Y" ++ sep "-" ++ "%m" ++ sep "-" ++ "%d " ++ icon "\988236" ++ " %H" ++ sep ":" ++ "%M" ++ sep ":" ++ "%S ") "date" 10
],
template = "}{ %date%",
alignSep = "}{",
position = TopH 24
}
main :: IO ()
main = xmobar config -- or: configFromArgs config >>= xmobar