diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2017-05-20 13:02:10 +0200 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2017-05-20 13:02:10 +0200 |
| commit | cfc96811131f11e10dd710377a2a1131485f170f (patch) | |
| tree | 6be2d1e5a2bf84be2b871749e6555d38bb5799ab /modules/services/khd | |
| parent | c8c2763c9ee8037ebda06a4b7f6bb74b6be09a53 (diff) | |
khd: add option to configure i3 keybindings
Diffstat (limited to 'modules/services/khd')
| -rw-r--r-- | modules/services/khd/default.nix | 10 | ||||
| -rw-r--r-- | modules/services/khd/i3.nix | 44 |
2 files changed, 54 insertions, 0 deletions
diff --git a/modules/services/khd/default.nix b/modules/services/khd/default.nix index 454e88a..3281a02 100644 --- a/modules/services/khd/default.nix +++ b/modules/services/khd/default.nix @@ -6,6 +6,8 @@ let cfg = config.services.khd; + i3Config = import ./i3.nix { inherit pkgs; }; + in { @@ -34,10 +36,18 @@ in default = ""; example = "alt + shift - r : kwmc quit"; }; + + services.khd.i3Keybindings = mkOption { + type = types.bool; + default = false; + description = "Wether to configure i3 style keybindings for kwm."; + }; }; config = mkIf cfg.enable { + services.khd.khdConfig = mkIf cfg.i3Keybindings i3Config; + security.accessibilityPrograms = mkIf cfg.enableAccessibilityAccess [ "${cfg.package}/bin/khd" ]; environment.etc."khdrc".text = cfg.khdConfig; diff --git a/modules/services/khd/i3.nix b/modules/services/khd/i3.nix new file mode 100644 index 0000000..3f2bd12 --- /dev/null +++ b/modules/services/khd/i3.nix @@ -0,0 +1,44 @@ +{ pkgs }: + +'' + alt - return : open -b com.apple.Terminal "" + alt - j : kwmc window -f west + alt - k : kwmc window -f south + alt - l : kwmc window -f north + alt - 0x29 : kwmc window -f east + alt - space : kwmc config focus-follows-mouse toggle + + alt + shift - j : kwmc window -m west + alt + shift - k : kwmc window -m south + alt + shift - l : kwmc window -m north + alt + shift - 0x29 : kwmc window -m east + + alt - f : kwmc window -z fullscreen + alt - v : kwmc display -c vertical + alt - h : kwmc display -c horizontal + alt - r : print "maybe with prefix?" + + alt - e : kwmc window -c type bsp + alt - s : kwmc window -c type monocle + alt - w : kwmc window -c type monocle + + alt + shift - space : kwmc window -t focused + + alt - 1 : kwmc space -fExperimental 2 + alt - 2 : kwmc space -fExperimental 3 + alt - 3 : kwmc space -fExperimental 4 + alt - 4 : kwmc space -fExperimental 5 + alt - 5 : kwmc space -fExperimental 6 + alt - 6 : kwmc space -fExperimental 7 + + alt + shift - 1 : kwmc window -m space 1 + alt + shift - 2 : kwmc window -m space 2 + alt + shift - 3 : kwmc window -m space 3 + alt + shift - 4 : kwmc window -m space 4 + alt + shift - 5 : kwmc window -m space 5 + alt + shift - 6 : kwmc window -m space 6 + + alt + shift - c : kwmc config reload + alt + shift - r : kwmc quit + alt + shift - e : kwmc quit +'' |
