nix-configs/haskell/xmobar/xmobar.hs

28 lines
723 B
Haskell
Raw Normal View History

2023-12-06 19:07:14 +00:00
import Xmobar
2023-12-06 12:14:02 +00:00
2023-12-06 19:07:14 +00:00
fc code content = "<fc=" ++ code ++ ">" ++ content ++ "</fc>"
2023-12-06 12:14:02 +00:00
2023-12-06 19:07:14 +00:00
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