Added slambda module!
This commit is contained in:
parent
bf7427d8c7
commit
0bd68f9e21
5 changed files with 108 additions and 2 deletions
hosts/nixos/common
|
@ -4,6 +4,7 @@ let
|
|||
imports = [
|
||||
inputs.agenix.nixosModule
|
||||
inputs.base16.nixosModule
|
||||
inputs.slambda.nixosModule
|
||||
# inputs.impermanence.nixosModule
|
||||
|
||||
./nix.nix
|
||||
|
|
67
hosts/nixos/common/optional/slambda.nix
Normal file
67
hosts/nixos/common/optional/slambda.nix
Normal file
|
@ -0,0 +1,67 @@
|
|||
let
|
||||
chord = from: to: { inherit from to; };
|
||||
unmap = from: chord from [ ];
|
||||
commonChords = [
|
||||
# {{{ Modifiers
|
||||
(chord [ "s" "d" ] [ "leftshift" ])
|
||||
(chord [ "k" "l" ] [ "rightshift" ])
|
||||
(chord [ "s" "f" ] [ "leftctrl" ])
|
||||
(chord [ "j" "l" ] [ "rightctrl" ])
|
||||
(chord [ "j" "k" "l" ] [ "rightctrl" "rightshift" ])
|
||||
(chord [ "s" "d" "f" ] [ "leftctrl" "leftshift" ])
|
||||
(chord [ "n" "l" ] [ "leftmeta" ])
|
||||
(unmap [ "leftmeta" ])
|
||||
(unmap [ "leftshift" ])
|
||||
(unmap [ "leftctrl" ])
|
||||
# }}}
|
||||
# {{{ Other special keys
|
||||
(chord [ "g" "h" ] [ "backspace" ])
|
||||
(chord [ "n" "v" ] [ "backslash" ])
|
||||
(chord [ "d" "f" ] [ "tab" ])
|
||||
(chord [ "e" "f" ] [ "enter" ])
|
||||
(chord [ "q" "w" ] [ "esc" ])
|
||||
(unmap [ "backspace" ])
|
||||
(unmap [ "enter" ])
|
||||
(unmap [ "tab" ])
|
||||
(unmap [ "esc" ])
|
||||
(unmap [ "backslash" ])
|
||||
# }}}
|
||||
# {{{ Tmux
|
||||
(chord [ "a" "n" "k" "l" ] [ "rightshift" "a" "n" ]) # Next tab in tmux
|
||||
(chord [ "a" "j" "l" ] [ "rightshift" "a" ]) # Tmux leader
|
||||
# }}}
|
||||
# {{{ WM keybinds
|
||||
(chord [ "n" "l" "q" ] [ "leftmeta" "1" ])
|
||||
(chord [ "n" "l" "w" ] [ "leftmeta" "2" ])
|
||||
(chord [ "n" "l" "e" ] [ "leftmeta" "3" ])
|
||||
(chord [ "n" "l" "r" ] [ "leftmeta" "4" ])
|
||||
(chord [ "n" "l" "a" ] [ "leftmeta" "5" ])
|
||||
(chord [ "n" "l" "s" ] [ "leftmeta" "6" ])
|
||||
(chord [ "n" "l" "d" ] [ "leftmeta" "7" ])
|
||||
(chord [ "n" "l" "f" ] [ "leftmeta" "8" ])
|
||||
(chord [ "n" "k" "l" ] [ "leftmeta" "p" ])
|
||||
# }}}
|
||||
# {{{ Handled by vim
|
||||
(chord [ "j" "k" ] [ "f10" ])
|
||||
(chord [ "c" "p" ] [ "f11" ])
|
||||
(chord [ "j" "i" ] [ "f12" ])
|
||||
# }}}
|
||||
];
|
||||
in
|
||||
{
|
||||
services.slambda = {
|
||||
enable = true;
|
||||
|
||||
keyboards.keychronK6 = {
|
||||
delay = 25;
|
||||
device = "/dev/input/by-id/usb-Keychron_Keychron_K6-event-kbd";
|
||||
chords = commonChords;
|
||||
};
|
||||
|
||||
keyboards.tethysLaptop = {
|
||||
delay = 25;
|
||||
device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd";
|
||||
chords = commonChords;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue