diff --git a/home-manager/modules/desktop/herbstluftwm.nix b/home-manager/modules/desktop/herbstluftwm.nix new file mode 100644 index 0000000..3b65ac3 --- /dev/null +++ b/home-manager/modules/desktop/herbstluftwm.nix @@ -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 { = "use "; } + 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; +} diff --git a/home-manager/pfke_at_errol.nix b/home-manager/pfke_at_errol.nix index 843077a..b44a360 100644 --- a/home-manager/pfke_at_errol.nix +++ b/home-manager/pfke_at_errol.nix @@ -9,7 +9,7 @@ in { ./modules/cli/bat.nix ./modules/cli/starship.nix ./modules/cli/zsh.nix - ./modules/desktop/hprland + ./modules/desktop/herbstluftwm.nix ./modules/keychain.nix ]; monitors = [