nixos-config/home-manager/modules/waybar.nix

113 lines
2.6 KiB
Nix
Raw Normal View History

2023-10-13 14:45:26 +00:00
{
2024-06-25 17:57:00 +00:00
programs.waybar = {
enable = true;
settings = [{
layer = "top";
position = "bottom";
height = 28;
modules-left = [
"sway/workspaces"
];
modules-center = [
"clock"
"idle_inhibitor"
];
modules-right = [
"disk"
"pulseaudio"
"network"
"memory"
"cpu"
"temperature"
"battery"
"tray"
];
modules = {
"battery" = {
states = {
warning = 20;
critical = 10;
2023-10-13 14:45:26 +00:00
};
2024-06-25 17:57:00 +00:00
format = " {capacity}%";
format-discharging = "{icon} {capacity}%";
format-icons = [
""
""
""
""
""
""
""
""
""
""
];
};
"cpu" = {
format = " {}";
};
"clock" = {
format = "{:%H:%M}";
tooltip = false;
};
"memory" = {
interval = 5;
format = " {}%";
tooltip-format = "{used:0.1f}/{total:0.1f} GB";
states = {
warning = 80;
critical = 90;
2023-10-13 14:45:26 +00:00
};
2024-06-25 17:57:00 +00:00
};
"network" = {
interface = "wl*";
format-wifi = " {essid}";
format-icons = [
""
];
tooltip-format-wifi = "{frequency} MHz, {signaldBm} dBm";
};
"pulseaudio" = {
scroll-step = 1;
format = "{icon} {volume}%";
format-bluetooth = "{icon} {volume}% ";
format-muted = "";
format-icons = {
headphones = "";
handsfree = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [ "" "" ];
2023-10-13 14:45:26 +00:00
};
2024-06-25 17:57:00 +00:00
on-click = "pavucontrol";
};
"sway/workspaces" = {
all-outputs = false;
disable-scroll = false;
format = "{name}";
};
"temperature" = {
format = " {temperatureC}°C";
hwmon-path = "/sys/class/hwmon/hwmon3/temp1_input";
critical-threshold = 75;
};
"disk" = {
interval = 30;
format = "{free}";
path = "/";
};
"idle_inhibitor" = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
2023-10-13 14:45:26 +00:00
};
};
2024-06-25 17:57:00 +00:00
};
}];
style = builtins.readFile ./waybar.css;
};
2023-10-13 14:45:26 +00:00
}