.files/nix/configurations/vanadium/home/xmobar.nix

61 lines
2.5 KiB
Nix

{
programs.xmobar = {
enable = true;
# XMobar's config file is not a segment of valid Haskell source code -- it is instead a DSL
# Note how `Run` handles its arguments properly without parens?
#
# Also xmobar wants GHC if we use it as a library, and I'm lazy, you probably want to keep it this way.
extraConfig = ''
Config { overrideRedirect = False
, font = "Iosevka 13"
, bgColor = "#000000"
, fgColor = "#FFFFFF"
, position = BottomH 30
, commands = [ Run Date "%a %d %H:%M:%S" "date" 10
, Run Battery
[ "-t", "<left> (<timeleft>)"
, "-H", "70"
, "-L", "20"
, "-h", "green"
, "-n", "orange"
, "-l", "red"
, "--"
, "-P"
, "-A", "20"
, "-a", "notify-send -u critical \"Battery Low\" \"Please charge your battery\""
]
600
, Run XMonadLog
, Run
DynNetwork
[ "--template"
, "<dev>: <tx> kB/s <rx> kB/s"
, "--Low"
, "102400"
, "--High"
, "1024000"
, "--low"
, "green"
, "--normal"
, "orange"
, "--high"
, "red"
]
100
, Run
Weather "LFRN"
[ "-t", "<station>: <tempC>C"
, "-L","10", "-H", "25"
, "--normal", "white"
, "--high", "orange"
, "--low", "blue"
]
9000
]
, sepChar = "%"
, alignSep = "}{"
, template = " %XMonadLog% }{ %dynnetwork% | %LFRN% | %battery% | %date% "
}
'';
};
}