refactor(waybar): register workspace window icons

This commit is contained in:
2026-10-11 17:53:44 -04:00
parent 4dd0a5a4f5
commit 4cc10a22ed
9 changed files with 84 additions and 26 deletions

View File

@@ -0,0 +1,25 @@
{ lib, util, ... }:
{
checks = [
{
assertion = util.registry.predicates.uniquePerHost (entry: entry.value.class);
message = "Window icons must use unique class patterns per host.";
}
];
type = lib.types.submodule {
options = {
class = lib.mkOption {
description = "Matches the window class reported by the compositor.";
type = lib.types.str;
example = ".*[Ff]irefox.*";
};
icon = lib.mkOption {
description = "Sets the Nerd Font codepoint shown for matching windows.";
type = lib.types.str;
example = "f269";
};
};
};
}