snowflake/home/waybar/default.nix

92 lines
2.2 KiB
Nix
Raw Normal View History

2023-02-03 09:58:36 -05:00
{
2023-04-09 13:54:25 -04:00
inputs,
pkgs,
lib,
2023-02-03 09:58:36 -05:00
...
2023-04-23 17:45:37 -04:00
}: let
2023-04-09 13:54:25 -04:00
compileSCSS = name: source: "${pkgs.runCommandLocal name {} ''
mkdir -p $out
${lib.getExe pkgs.sassc} -t expanded '${source}' > $out/${name}.css
''}/${name}.css";
2023-04-23 17:45:37 -04:00
in {
2023-02-01 14:27:09 -05:00
programs.waybar = {
enable = true;
2023-04-09 13:54:25 -04:00
package = inputs.hyprland.packages.${pkgs.system}.waybar-hyprland;
2023-02-03 09:58:36 -05:00
settings = {
mainBar = {
output = "DP-3";
layer = "top";
position = "top";
height = 35;
2023-04-09 13:54:25 -04:00
width = 1880;
2023-02-03 09:58:36 -05:00
spacing = 10;
margin-top = 8;
modules-left = [
2023-04-23 17:45:37 -04:00
"image/nixos"
"user"
"wlr/workspaces"
2023-02-03 09:58:36 -05:00
];
modules-center = [
"hyprland/window"
];
modules-right = [
"cpu"
"memory"
"clock"
"tray"
"custom/wlogout"
];
2023-04-09 13:54:25 -04:00
"image/nixos" = {
path = "/home/notoh/snowflake/home/waybar/assets/nixos.png";
2023-02-03 09:58:36 -05:00
size = 24;
2023-04-23 17:45:37 -04:00
};
2023-04-09 13:54:25 -04:00
"user" = {
format = "{user} up {work_d} days | {work_H} hrs | {work_M} min ";
2023-02-03 09:58:36 -05:00
interval = 60;
icon = false;
};
"hyprland/window" = {
format = " {}";
seperate-outputs = true;
max-length = 35;
};
2023-04-09 13:54:25 -04:00
"wlr/workspaces" = {
format = "{icon}";
on-click = "activate";
all-outputs = true;
2023-02-03 09:58:36 -05:00
format-icons = {
2023-04-09 13:54:25 -04:00
"1" = "";
"2" = "";
"3" = "";
"4" = "";
"5" = "";
2023-02-03 09:58:36 -05:00
};
};
"cpu" = {
2023-05-12 03:24:39 -04:00
format = "{usage}% ";
2023-02-03 09:58:36 -05:00
tooltip = "false";
interval = "2";
2023-02-03 09:58:36 -05:00
};
"memory" = {
format = "{}% ";
interval = "15";
2023-02-03 09:58:36 -05:00
};
"clock" = {
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format-alt = "{:%Y-%m-%d}";
};
"tray" = {
spacing = 0;
};
"custom/wlogout" = {
format = "";
interval = "once";
on-click = "wlogout -c 5 -r 5";
tooltip = "false";
};
};
};
2023-04-09 13:54:25 -04:00
style = builtins.readFile (compileSCSS "waybar-style" ./style.scss);
2023-02-01 14:27:09 -05:00
};
2023-04-23 17:45:37 -04:00
}