mirror of
https://github.com/larstvei/nix-config.git
synced 2025-08-30 04:40:13 +00:00
Customize keyboard with homerow mods and swapping alt/super
This commit is contained in:
parent
6704608990
commit
0c178db4a8
@ -18,6 +18,7 @@
|
||||
gestures.workspace_swipe = true;
|
||||
|
||||
input = {
|
||||
kb_options = "altwin:swap_alt_win";
|
||||
natural_scroll = true;
|
||||
scroll_factor = 0.4;
|
||||
touchpad = {
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
emacs-larstvei,
|
||||
zen-browser,
|
||||
@ -12,6 +11,7 @@ in
|
||||
imports = [
|
||||
../../system
|
||||
../../system/nixos
|
||||
./keyboard.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
37
hosts/thinkpad/keyboard.nix
Normal file
37
hosts/thinkpad/keyboard.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
services.kanata = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
internalKeyboard = {
|
||||
devices = [
|
||||
"/dev/input/by-path/platform-i8042-serio-0-event-kbd"
|
||||
];
|
||||
extraDefCfg = "process-unmapped-keys yes";
|
||||
config = ''
|
||||
(defsrc
|
||||
caps a s d f j k l ;
|
||||
)
|
||||
(defvar
|
||||
tap-time 150
|
||||
hold-time 200
|
||||
)
|
||||
(defalias
|
||||
caps (tap-hold 100 100 esc lctl)
|
||||
a (tap-hold $tap-time $hold-time a lsft)
|
||||
s (tap-hold $tap-time $hold-time s lalt)
|
||||
d (tap-hold $tap-time $hold-time d lmet)
|
||||
f (tap-hold $tap-time $hold-time f lctl)
|
||||
j (tap-hold $tap-time $hold-time j rctl)
|
||||
k (tap-hold $tap-time $hold-time k rmet)
|
||||
l (tap-hold $tap-time $hold-time l ralt)
|
||||
; (tap-hold $tap-time $hold-time ; rsft)
|
||||
)
|
||||
|
||||
(deflayer base
|
||||
@caps @a @s @d @f @j @k @l @;
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user