Sway : Sway Esc and Caps.
This commit is contained in:
parent
7a2aa652d5
commit
3124bf3a50
|
@ -120,6 +120,7 @@
|
|||
./module/common/Firewall.nix
|
||||
./module/common/Font.nix
|
||||
./module/common/Git.nix
|
||||
./module/common/KbdInterception.nix
|
||||
./module/common/Kernel.nix
|
||||
./module/common/Ld.nix
|
||||
./module/common/Locale.nix
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{ ... }: {
|
||||
{ lib, ... }: {
|
||||
imports = [
|
||||
./Filesystem.nix
|
||||
./Tablet.nix
|
||||
./Vpn.nix
|
||||
];
|
||||
|
||||
# Disable Kbd Interception.
|
||||
services.interception-tools.enable = lib.mkForce false;
|
||||
}
|
||||
|
|
11
module/common/KbdInterception.nix
Normal file
11
module/common/KbdInterception.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, ... }: {
|
||||
# Map CapsLock to Esc on single press and Ctrl on when used with multiple keys.
|
||||
services.interception-tools = {
|
||||
enable = true;
|
||||
plugins = [ pkgs.interception-tools-plugins.caps2esc ];
|
||||
udevmonConfig = builtins.toJSON [{
|
||||
JOB = "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.caps2esc}/bin/caps2esc | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE";
|
||||
DEVICE.EVENTS.EV_KEY = [ "KEY_CAPSLOCK" "KEY_ESC" ];
|
||||
}];
|
||||
};
|
||||
}
|
|
@ -32,7 +32,7 @@ input type:touchpad {
|
|||
|
||||
input type:keyboard {
|
||||
xkb_layout us,ru
|
||||
xkb_options grp:caps_toggle,lv3:ralt_switch
|
||||
xkb_options grp:lctrl_toggle,lv3:ralt_switch
|
||||
}
|
||||
|
||||
# Hide mouse cursor after a period of inactivity.
|
||||
|
|
Loading…
Reference in a new issue