switch datetime module to xmobar

This commit is contained in:
Schrottkatze 2023-12-06 20:07:14 +01:00
parent 31ba7cac22
commit b7987a87b4
4 changed files with 33 additions and 41 deletions

View file

@ -1,27 +1,27 @@
import Xmobar
import Xmobar
config :: Config
config =
defaultConfig
{ font = "FiraCode Nerd Font",
allDesktops = True,
alpha = 255,
bgColor = "#282828",
fgColor = "#ebdbb2",
commands =
-- [ Run XMonadLog,
-- Run $ Memory ["t", "Mem: <usedratio>%"] 10,
-- Run $ Kbd [],
-- Run $ Date "%a %_d %b %Y <fc=#ee9a00>%H:%M:%S</fc>" "date" 10
-- ],
[ Run $ Memory ["t", "Mem: <usedratio>%"] 10,
Run $ Kbd [],
Run $ Date "%a %_d %b %Y <fc=#ee9a00>%H:%M:%S</fc>" "date" 10
],
template = "%kbd% | %date% | %memory%",
alignSep = "}{",
position = TopH 24
}
fc code content = "<fc=" ++ code ++ ">" ++ content ++ "</fc>"
main :: IO ()
main = xmobar config -- or: configFromArgs config >>= xmobar
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