You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
979 B
33 lines
979 B
{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;
|
|
keybinds = ''
|
|
Mod4-Control-h = "resize left +0.02"
|
|
Mod4-Control-j = "resize down +0.02"
|
|
Mod4-Control-k = "resize up +0.02"
|
|
Mod4-Control-l = "resize right +0.02"
|
|
Mod4-Control-Left = "resize left +0.02"
|
|
Mod4-Control-Down = "resize down +0.02"
|
|
Mod4-Control-Up = "resize up +0.02"
|
|
Mod4-Control-Right = "resize right +0.02"
|
|
'';
|
|
tags = lib.catAttrs "name" tags;
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|