snowflake/home/wayland/river/waybar/default.nix

61 lines
1.3 KiB
Nix
Raw Normal View History

2023-06-10 21:06:19 -04:00
{
pkgs,
lib,
...
}: let
compileSCSS = name: source: "${pkgs.runCommandLocal name {} ''
mkdir -p $out
${lib.getExe pkgs.sassc} -t expanded '${source}' > $out/${name}.css
''}/${name}.css";
in {
programs.waybar = {
enable = true;
systemd.enable = true;
settings = {
bar = {
layer = "top";
position = "top";
height = 30;
modules-left = ["river/tags"];
modules-center = ["river/window"];
modules-right = ["cpu" "memory" "clock" "battery" "tray"];
};
"river/tags" = {
num-tags = 5;
2023-06-11 00:04:26 -04:00
tag-labels = ["" "" "" "" ""];
2023-06-10 21:06:19 -04:00
};
"river/window" = {
format = "{}";
};
"cpu" = {
interval = 10;
format = "{}%";
max-length = 10;
2023-06-11 00:04:26 -04:00
tooltip = false;
2023-06-10 21:06:19 -04:00
};
"memory" = {
interval = 10;
format = "{}%";
max-length = 10;
2023-06-11 00:04:26 -04:00
tooltip = false;
2023-06-10 21:06:19 -04:00
};
"battery" = {
2023-06-11 00:04:26 -04:00
format = "{capacity}%";
2023-06-10 21:06:19 -04:00
interval = 60;
2023-06-11 00:04:26 -04:00
tooltip = false;
2023-06-10 21:06:19 -04:00
};
"clock" = {
interval = 60;
format = "{:%H:%M}";
max-length = 25;
2023-06-11 00:04:26 -04:00
tooltip = false;
2023-06-10 21:06:19 -04:00
};
"tray" = {
icon-size = 21;
spacing = 5;
};
};
style = builtins.readFile (compileSCSS "style" ./style.scss);
};
}