Files
nixos-conf/home/packages/waybar/waybar.nix
2025-11-25 16:50:47 -07:00

167 lines
3.9 KiB
Nix

{ ... }:
{
programs.waybar = {
enable = true;
systemd.enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 45;
spacing = 4;
# Module layout
#
modules-left = [
"river/tags"
];
modules-center = [
"custom/currents"
"river/window"
];
modules-right = [
"pulseaudio"
"network#wifi"
"cpu"
"memory"
"temperature"
"backlight"
"battery"
"clock"
"tray"
];
# Module configurations
"river/tags" = {
num-tags = 10;
tag-labels = [
"1"
"2"
"3"
"4"
"5"
"6"
"7"
"8"
"9"
"0"
];
set-tags = [
2147483649
2147483650
2147483652
2147483656
2147483664
2147483680
2147483712
2147483776
2147483904
2147483648
];
toggle-tags = [
1
2
4
8
16
32
64
128
256
];
hide-vacant = true;
};
"river/window" = {
format = "{}";
max-length = 20;
};
"tray" = {
icon-size = 21;
spacing = 10;
};
"clock" = {
timezone = "America/Denver";
tooltip-format = "<big>{calendar}</big>";
format-alt = "{:%Y-%m-%d}";
};
"cpu" = {
format = "{usage}% ";
tooltip = true;
};
"memory" = {
format = "{}% ";
};
"temperature" = {
# thermal-zone = 2;
# hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
critical-threshold = 80;
format-critical = "{temperatureC}°C {icon}";
format = "{temperatureC}°C {icon}";
format-icons = ["" "" ""];
};
"backlight" = {
format = "{percent}% {icon}";
format-icons = ["" "" "" "" "" "" "" "" ""];
};
"battery" = {
states = {
good = 95;
warning = 30;
critical = 15;
};
format = "{icon} {capacity}%";
format-full = "{icon} Full";
format-charging = "{icon} {capacity}% {time}";
format-plugged = "{icon} ";
format-good = ">{icon} {capacity}%";
format-icons = [" " " " " " " " " "];
};
"network#wifi" = {
interface = "wlp*";
format-wifi = "{essid} ({signalStrength}%) ";
tooltip-format = "{ifname} via {gwaddr} ";
format-linked = "{ifname} (No IP) ";
format-disconnected = "No WiFi";
format-alt = "{ifname}: {ipaddr}/{cidr}";
};
"pulseaudio" = {
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = " {icon} {format_source}";
format-muted = " {format_source}";
format-source = "{volume}% ";
format-source-muted = "";
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = ["" "" ""];
on-click = "pavucontrol";
};
};
"custom/currents"= {
interval= 150;
exec= "/home/autumn/.local/bin/currents --output";
return-type= "json";
};
};
};
};
xdg.configFile."waybar/style.css".source = ./waybar.css;
}