i3: Rebind caps lock to tab on boot

master
Chan Wen Xu 2021-11-29 12:34:55 +07:00
parent 00b627f991
commit 44518bbd4c
1 changed files with 5 additions and 0 deletions

@ -3,6 +3,10 @@ let
modifier = "Mod4"; modifier = "Mod4";
lockText = "(e)xit, (r)estart, (s)hutdown"; lockText = "(e)xit, (r)estart, (s)hutdown";
wallpaper = "${pkgs.nixos-artwork.wallpapers.dracula}/share/backgrounds/nixos/nix-wallpaper-dracula.png"; wallpaper = "${pkgs.nixos-artwork.wallpapers.dracula}/share/backgrounds/nixos/nix-wallpaper-dracula.png";
keyboardMap = pkgs.writeText "xkb-layout" ''
clear Lock
keycode 66 = Tab ISO_Left_Tab Tab ISO_Left_Tab
'';
in in
{ {
fonts = { fonts = {
@ -12,6 +16,7 @@ in
startup = [ startup = [
{ command = "${pkgs.feh}/bin/feh --bg-scale ${wallpaper}"; notification = false; } { command = "${pkgs.feh}/bin/feh --bg-scale ${wallpaper}"; notification = false; }
{ command = "${pkgs.xorg.xmodmap}/bin/xmodmap ${keyboardMap}"; notification = false; }
]; ];
focus.mouseWarping = false; focus.mouseWarping = false;