{ config, lib, inputs, ... }: let inherit (lib) mkIf; icon_size = 28; in { imports = [ ./swaync.nix inputs.ironbar.homeManagerModules.default ]; programs.ironbar = { enable = true; systemd = true; config = { position = "top"; anchor_to_edges = true; start = [ { bar = [ { label = ""; name = "power-btn"; on_click = "popup:toggle"; type = "button"; } ]; class = "power-menu"; popup = [ { orientation = "vertical"; type = "box"; widgets = [ { label = "Power menu"; name = "header"; type = "label"; } { type = "box"; widgets = [ { class = "power-btn"; label = ""; on_click = "!shutdown now"; type = "button"; } { class = "power-btn"; label = ""; on_click = "!reboot"; type = "button"; } ]; } { label = "Uptime: {{30000:uptime -p | cut -d ' ' -f2-}}"; name = "uptime"; type = "label"; } ]; } ]; tooltip = "Up: {{30000:uptime -p | cut -d ' ' -f2-}}"; type = "custom"; } ]; center = [ { inherit icon_size; type = "focused"; show_icon = true; show_title = true; truncate = "end"; } ]; end = [ { type = "upower"; format = "{percentage}%"; } {type = "clock";} { type = "tray"; inherit icon_size; } (mkIf config.services.swaync.enable { type = "notifications"; "show_count" = true; icons = { "closed_none" = "󰍥"; "closed_some" = "󱥂"; "closed_dnd" = "󱅯"; "open_none" = "󰍡"; "open_some" = "󱥁"; "open_dnd" = "󱅮"; }; }) ]; }; style = '' .tray .item { min-width: 40px; } ''; }; }