{ config, ... }: {
systemd.user.targets.tray.Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
};
programs.waybar = {
enable = true;
style = ./style.css;
systemd = {
enable = true;
target = "hyprland-session.target";
};
settings.main = {
layer = "top";
position = "top";
# Layout
"modules-left" = [ "mpris" ];
"modules-center" = [ "hyprland/workspaces" ];
"modules-right" = [
"battery"
"pulseaudio"
"disk"
"cpu"
"memory"
"clock"
"custom/notification"
"custom/separator"
"tray"
];
# Module config
"custom/separator" = { format = "|"; };
"hyprland/workspaces" = {
format = "{icon}";
format-icons = {
default = " ";
"1" = " ";
"2" = " ";
"3" = " ";
"4" = " ";
"5" = " ";
"6" = " ";
"editor" = " ";
"term" = " ";
"web" = " ";
"files" = " ";
"btm" = " ";
"chat" = " ";
"games" = " ";
"stream" = " ";
};
show-special = false;
sort-by = "id";
};
mpris = {
"format" = "{player_icon} {artist} - {title}";
"tooltip-format" = "{player_icon} ({player}) {dynamic}";
"interval" = 1;
"dynamic-order" = [ "album" "artist" "title" "position" "length" ];
"player-icons" = {
"default" = " ";
"emms" = " ";
"firefox" = " ";
"mpv" = " ";
};
"status-icons" = {
"playing" = "";
"paused" = "";
"stopped" = "";
};
"ignored-players" = [ ];
};
pulseaudio = {
scroll-step = 5;
format = "{format_source} {icon} {volume}%";
format-muted = "{format_source} ";
format-source = " {volume}%";
format-source-muted = "";
format-icons = {
car = "";
default = [ "" "" "" ];
hands-free = "";
headset = "";
phone = "";
portable = "";
headphone = "";
};
on-click = "pavucontrol";
on-click-middle = "volumectl -m %";
on-click-right = "volumectl %";
on-scroll-up = "volumectl -u + 5";
on-scroll-down = "volumectl -u - 5";
};
disk = {
format = " {percentage_used}%";
path = config.home.homeDirectory;
};
cpu = {
format = " {usage}%";
tooltip = false;
};
memory = { format = " {}%"; };
temperature = {
critical-threshold = 80;
format = "{icon} {temperatureC}°C";
format-icons = [ "" "" "" ];
};
clock = {
format = "{: %Y-%m-%d %R}";
format-alt = "{: %R}";
tooltip-format = "{calendar}";
calendar = {
mode = "month";
mode-mon-col = 3;
weeks-pos = "left";
on-scroll = 1;
on-click-right = "mode";
format = {
months = "{}";
days = "{}";
weeks = "W{}";
weekdays = "{}";
today = "{}";
};
};
actions = {
on-click-right = "mode";
on-scroll-up = "shift_up";
on-scroll-down = "shift_down";
};
};
backlight = {
format = "{icon}";
tooltip-format = "{percent}%";
format-icons = [ "" "" "" "" "" "" "" "" "" ];
};
battery = {
states = {
warning = 30;
critical = 15;
};
format = "{icon} {capacity}%";
format-charging = " {capacity}%";
format-plugged = "";
tooltip-format = "{time}";
format-icons = [ "" "" "" "" "" "" "" "" "" "" "" ];
};
"custom/notification" = {
"tooltip" = false;
"format" = "{icon}";
"format-icons" = {
"notification" = " ";
"none" = " ";
"dnd-notification" = " ";
"dnd-none" = " ";
"inhibited-notification" = " ";
"inhibited-none" = " ";
"dnd-inhibited-notification" = " ";
"dnd-inhibited-none" = " ";
};
"return-type" = "json";
"exec-if" = "which swaync-client";
"exec" = "swaync-client -swb";
"on-click" = "swaync-client -t -sw";
"on-click-right" = "swaync-client -d -sw";
"escape" = true;
};
tray = {
icon-size = 16;
show-passive-items = true;
spacing = 5;
};
};
};
}