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-09 13:54:25 -04:00
|
|
|
}:
|
2023-04-09 14:34:42 -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";
|
|
|
|
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 = [
|
|
|
|
"image/nixos"
|
|
|
|
"user"
|
2023-04-09 13:54:25 -04:00
|
|
|
"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-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" = {
|
|
|
|
format = "{usage}% ";
|
|
|
|
tooltip = "false";
|
|
|
|
};
|
|
|
|
"memory" = {
|
|
|
|
format = "{}% ";
|
|
|
|
};
|
|
|
|
"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
|
|
|
};
|
|
|
|
}
|