Files
nix-config/systems/modules/home/wm/waybar.nix
Armel van Ravels b4fed26fdd Add screen recording
2026-07-15 10:24:38 +02:00

86 lines
1.5 KiB
Nix

{ pkgs, ... }:
{
programs.waybar = {
enable = true;
style = builtins.readFile ./waybar/waybar-style.css;
settings.mainBar = {
layer = "top";
position = "top";
height = 30;
modules-left = [
"hyprland/workspaces"
"mpris"
];
modules-center = [
"wlr/taskbar"
];
modules-right = [
"custom/recording"
"pulseaudio"
"cpu"
"tray"
"clock"
];
"custom/recording" = {
exec = ''
if pgrep -x wf-recorder >/dev/null; then
echo "🔴 REC"
fi
'';
interval = 1;
tooltip = false;
};
pulseaudio = {
format = "{icon} {volume}%";
format-muted = "󰝟 muted";
tooltip = false;
scroll-step = 5;
format-icons = {
default = [
"󰕿"
"󰖀"
"󰕾"
];
};
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
};
mpris = {
player = "spotify";
format = "{player_icon} {artist} - {title}";
format-paused = "{player_icon} {title}";
tooltip = true;
ignored-players = [
"firefox"
"vlc"
];
};
cpu = {
format = " {usage}%";
tooltip = false;
};
clock = {
tooltip = false;
};
"wlr/taskbar" = {
format = "{icon} {name}";
on-click = "activate";
};
};
};
}