import Xmobar
bg, fg, grey, red, green, yellow, blue, magenta, cyan, white, sep :: String
sep = "║"
bg = "#1d1f21"
fg = "#c5c8c6"
grey = "#969896"
red = "#cc6666"
green = "#b5bd68"
yellow = "#f0c674"
blue = "#81a2be"
magenta = "#b294bb"
cyan = "#8abeb7"
white = "#ecebec"
config :: Config
config =
defaultConfig
{ font = "xft:Fira Mono:style=Regular:antialias=true:pixelsize,Font Awesome 5 Brands:pixelsize=16,Font Awesome 5 Free:pixelsize=16:style=Solid,Lohit Devanagari:style=Regular:pixelsize=16,Lohit Gurmukhi:style=Regular:pixelsize=16,Noto Sans CJK JP:style=Regular:pixelsize=16,Noto Sans CJK KR:style=Regular:pixelsize=16,Noto Sans CJK SC:style=Regular:pixelsize=16",
additionalFonts =
[ "xft:Font Awesome 5 Free:pixelsize=15:style=Solid",
"xft:Font Awesome 5 Brands:pixelsize=15"
],
position = Static { xpos = 0, ypos = 0, height = 23, width = 1920 },
bgColor = bg,
fgColor = fg,
lowerOnStart = False,
overrideRedirect = False,
allDesktops = True,
persistent = True,
commands =
[ Run $ MultiCpu ["-t", "\xf2db %", "-L", "20", "-H", "80", "-h", magenta, "-l", green, "-n", yellow] 10,
Run $ Memory ["-t", "\xf538 %", "-H", "10240", "-L", "6144", "-h", magenta, "-l", green, "-n", yellow] 20,
Run $ BatteryP ["BAT1", "BAT0", "BAT2"] ["-t", "", "-L", "10", "-H", "80", "-l", magenta, "-h", green, "-n", yellow, "--", "-O", "Charging", "-o", "%", "-a", "notify-send -u critical 'Battery running out!'", "-A", "5", "--lows", "\xf243 ", "--mediums", "\xf242 ", "--highs", "\xf240 "] 300,
Run $ Network "wlp0s20f3" ["-t", "\xf1eb /"] 10,
Run $ Date "\xf073 %-d/%-m/%-y/%w" "date" 10000,
Run $ Date "%H:%M:%S" "time" 10,
Run $ MPD ["-t", " \xf001", "--", "-P", ">> ", "-Z", "|| ", "-S", "Stopped", "-h", "127.0.0.1", "-p", "6600"] 10,
Run $ Com "/home/natto/.xmonad/lib/padding-icon.sh" ["stalonetray"] "tray" 10,
Run $ Com "pamixer" ["--get-volume"] "" 100,
Run UnsafeStdinReader
],
sepChar = "*",
alignSep = "--",
template = " *UnsafeStdinReader* " ++ sep ++ " *mpd* -- *multicpu* " ++ sep ++ " *memory* " ++ sep ++ " *wlp0s20f3* " ++ sep ++ " *battery* " ++ sep ++ " \xf028 *pamixer*% " ++ sep ++ " *date* - *time* " ++ sep ++ "*tray*"
}
main :: IO ()
main = xmobar config