refactor(waybar): register workspace window icons
This commit is contained in:
25
configs/nixos/registry/window-icon.nix
Normal file
25
configs/nixos/registry/window-icon.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user