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

85 lines
2.5 KiB
Nix
Raw Permalink Normal View History

2024-05-06 23:21:25 +02:00
{
2024-02-16 14:52:29 +01:00
programs.waybar = {
enable = true;
2024-05-06 23:21:25 +02:00
catppuccin.enable = true;
2024-02-16 14:52:29 +01:00
settings = {
2024-05-15 18:21:13 +02:00
mainBar =
let
in
{
layer = "top";
position = "top";
height = 30;
output = [
"eDP-1"
"HDMI-A-1"
];
modules-left = [ "sway/workspaces" ];
modules-center = [ "clock#week" "clock#year" "clock#time" ];
modules-right = [ "network" "pulseaudio" "memory" "cpu" "battery" ];
2024-02-16 14:52:29 +01:00
2024-05-15 18:21:13 +02:00
"clock#time" = {
format = "{:%H:%M:%S}";
interval = 1;
2024-04-21 16:55:34 +02:00
};
2024-05-15 18:21:13 +02:00
"clock#week" = {
format = "{:%a}";
};
2024-04-21 18:44:28 +02:00
2024-05-15 18:21:13 +02:00
"clock#year" = {
format = "{:%Y-%m-%d}";
};
2024-04-21 17:01:48 +02:00
2024-05-15 18:21:13 +02:00
battery = {
2024-05-15 20:00:34 +02:00
format = "{icon} <span color='#cdd6f4'>{capacity}% {time}</span>";
2024-05-15 18:21:13 +02:00
format-time = " {H} h {M} m";
format-icons = [ "" "" "" "" "" ];
states = {
warning = 30;
critical = 15;
};
2024-04-21 16:39:57 +02:00
};
2024-05-15 18:21:13 +02:00
cpu = {
2024-05-15 20:00:34 +02:00
format = "<span color='#74c7ec'></span> {usage}%";
2024-05-15 18:21:13 +02:00
};
memory = {
2024-05-15 20:00:34 +02:00
format = "<span color='#89b4fa'></span> {percentage}%";
2024-05-15 18:21:13 +02:00
interval = 5;
};
2024-04-21 17:18:22 +02:00
2024-05-15 18:21:13 +02:00
pulseaudio = {
2024-05-15 20:00:34 +02:00
format = "<span color='#a6e3a1'>{icon}</span> {volume}% | {format_source}";
format-muted = "<span color='#f38ba8'>󰝟</span> {volume}% | {format_source}";
format-source = "{volume}% <span color='#a6e3a1'></span>";
format-source-muted = "{volume}% <span color='#f38ba8'></span>";
2024-05-15 18:21:13 +02:00
format-icons = {
headphone = "";
default = [ "" "" "" ];
};
};
network = {
2024-05-15 20:00:34 +02:00
format-ethernet = "<span color='#89dceb'>󰈁</span> | <span color='#fab387'></span> {bandwidthUpBytes} <span color='#fab387'></span> {bandwidthDownBytes}";
format-wifi = "<span color='#06b6d4'>{icon}</span> | <span color='#fab387'></span> {bandwidthUpBytes} <span color='#fab387'></span> {bandwidthDownBytes}";
format-disconnected = "<span color='#eba0ac'>󰈂 no connection</span>";
2024-05-15 18:21:13 +02:00
format-icons = [ "󰤟" "󰤢" "󰤥" "󰤨" ];
interval = 5;
};
"sway/workspaces" = {
disable-scroll = true;
all-outputs = true;
};
2024-02-16 14:52:29 +01:00
};
};
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
};
}