2 changed files with 18 additions and 1 deletions
@ -0,0 +1,17 @@ |
|||
{config, lib, pkgs, ...}: |
|||
let |
|||
# A list is used because it preserves ordering |
|||
tags = [ |
|||
{ name = "tag 1"; key = "something"; } |
|||
{ name = "tag 2"; } |
|||
]; |
|||
# Attribute set of { <keybind> = "use <tag>"; } |
|||
keybinds = let |
|||
tagsWithKeybinds = lib.filter (lib.hasAttr "key") tags; |
|||
in lib.listToAttrs (map (x: lib.nameValuePair x.key "use ${x.name}") tagsWithKeybinds); |
|||
in |
|||
{ |
|||
xsession.windowManager.herbstluftwm.enable = true; |
|||
xsession.windowManager.herbstluftwm.keybinds = keybinds; |
|||
xsession.windowManager.herbstluftwm.tags = lib.catAttrs "name" tags; |
|||
} |
|||
Loading…
Reference in new issue