Move and refactor Kanata configuration
All checks were successful
/ check (push) Successful in 1m41s
All checks were successful
/ check (push) Successful in 1m41s
This commit is contained in:
parent
1be1e2dd8d
commit
d19c5e6bcd
8 changed files with 54 additions and 73 deletions
|
@ -4,7 +4,6 @@
|
|||
./dwm
|
||||
./gitea-actions-runner.nix
|
||||
./gnupg.nix
|
||||
./kanata.nix
|
||||
./nixpad
|
||||
./podman.nix
|
||||
];
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.features.cli.${service};
|
||||
service = "kanata";
|
||||
|
||||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkIf
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
in
|
||||
{
|
||||
options.features.cli.${service} = {
|
||||
enable = mkEnableOption "Enable ${service}";
|
||||
|
||||
devices = mkOption {
|
||||
default = [ ];
|
||||
type = types.listOf types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.kanata = {
|
||||
enable = true;
|
||||
|
||||
keyboards = {
|
||||
default = {
|
||||
devices = cfg.devices;
|
||||
|
||||
extraDefCfg = "process-unmapped-keys yes";
|
||||
|
||||
config = ''
|
||||
(defsrc
|
||||
caps a s d f j k l ;
|
||||
)
|
||||
|
||||
(defvar
|
||||
tap-time 150
|
||||
hold-time 200
|
||||
hold-time-slow 300
|
||||
)
|
||||
|
||||
(defalias
|
||||
escctrl (tap-hold 100 100 esc lctl)
|
||||
a (tap-hold $tap-time $hold-time-slow a lmet)
|
||||
s (tap-hold $tap-time $hold-time-slow s lalt)
|
||||
d (tap-hold $tap-time $hold-time d lsft)
|
||||
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 rsft)
|
||||
l (tap-hold $tap-time $hold-time-slow l ralt)
|
||||
; (tap-hold $tap-time $hold-time-slow ; rmet)
|
||||
)
|
||||
|
||||
(deflayer base
|
||||
@escctrl @a @s @d @f @j @k @l @;
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue