refactor(waybar): store rendered window icons
This commit is contained in:
@@ -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);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user