refactor(waybar): store rendered window icons

This commit is contained in:
2026-10-11 20:08:20 -04:00
parent 5ba231d590
commit 5b644e1fd2
9 changed files with 12 additions and 15 deletions

View File

@@ -4,9 +4,6 @@
...
}:
# The Hyprland compositor.
let
glyph = code: builtins.fromJSON ''"\u${code}"'';
in
{
options.modules.desktop.session.hyprland.enable = lib.mkEnableOption "the Hyprland compositor";
@@ -238,9 +235,9 @@ in
on-click = "activate";
format = "{id} {windows}";
format-window-separator = " ";
window-rewrite-default = glyph "f2d0";
window-rewrite-default = builtins.fromJSON ''"\uf2d0"'';
window-rewrite = lib.mapAttrs' (
_name: windowIcon: lib.nameValuePair "class<${windowIcon.class}>" (glyph windowIcon.icon)
_name: windowIcon: lib.nameValuePair "class<${windowIcon.class}>" windowIcon.icon
) (lib.attrByPath [ config.networking.hostName ] { } config.registry.window-icon);
};
};