configuration.nix/modules/home/programs/waybar/default.nix

77 lines
1.9 KiB
Nix
Raw Normal View History

2024-02-16 14:52:29 +01:00
{ pkgs, ... }: {
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
output = [
"eDP-1"
"HDMI-A-1"
];
modules-left = [ "sway/workspaces" ];
2024-04-21 18:44:28 +02:00
modules-center = [ "clock" ];
modules-right = [ "network" "pulseaudio" "memory" "cpu" "battery" ];
2024-02-16 15:52:25 +01:00
clock = {
2024-02-17 13:33:33 +01:00
format = "{:%a %Y-%m-%d %H:%M:%S %Z}";
2024-02-16 15:52:25 +01:00
interval = 1;
timezones = [ "Europe/Sofia" "Europe/Prague" ];
2024-02-17 13:33:33 +01:00
actions = {
on-scroll-up = "tz_up";
on-scroll-down = "tz_down";
};
2024-02-16 15:52:25 +01:00
};
2024-02-16 14:52:29 +01:00
2024-04-21 16:55:34 +02:00
battery = {
2024-04-21 17:29:55 +02:00
format = "{icon} {capacity}% {time}";
format-time = " {H} h {M} m";
2024-04-21 16:55:34 +02:00
format-icons = [ "" "" "" "" "" ];
states = {
warning = 30;
critical = 15;
};
};
2024-04-21 18:44:28 +02:00
cpu = {
format = " {usage}%";
};
2024-04-21 17:01:48 +02:00
memory = {
2024-04-21 18:44:28 +02:00
format = " {percentage}%";
2024-04-21 17:01:48 +02:00
interval = 5;
};
2024-04-21 16:39:57 +02:00
pulseaudio = {
format = "{icon} {volume}% | {format_source}";
format-source = "{volume}% ";
format-source-muted = "";
format-icons = {
headphone = "";
2024-04-21 18:44:28 +02:00
default = [ "" "" "" ];
2024-04-21 16:39:57 +02:00
};
};
2024-04-21 17:18:22 +02:00
network = {
format-ethernet = "󰈁 | {bandwidthUpBytes} {bandwidthDownBytes}";
format-wifi = "{icon} | {bandwidthUpBytes} {bandwidthDownBytes}";
format-disconnected = "󰈂";
format-icons = [ "󰤟" "󰤢" "󰤥" "󰤨" ];
interval = 1;
};
2024-02-16 14:52:29 +01:00
"sway/workspaces" = {
disable-scroll = true;
all-outputs = true;
};
};
};
2024-04-19 15:31:56 +02:00
systemd = {
enable = true;
target = "sway-session.target";
};
2024-04-21 18:44:28 +02:00
style = builtins.readFile ./style.css;
2024-02-16 14:52:29 +01:00
};
}