From 44518bbd4cc1b16a344632503c7813a7402fe4ae Mon Sep 17 00:00:00 2001 From: Chan Wen Xu Date: Mon, 29 Nov 2021 12:34:55 +0800 Subject: [PATCH] i3: Rebind caps lock to tab on boot --- home/i3.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/home/i3.nix b/home/i3.nix index 800e8ae..b884009 100644 --- a/home/i3.nix +++ b/home/i3.nix @@ -3,6 +3,10 @@ let modifier = "Mod4"; lockText = "(e)xit, (r)estart, (s)hutdown"; 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 { fonts = { @@ -12,6 +16,7 @@ in startup = [ { command = "${pkgs.feh}/bin/feh --bg-scale ${wallpaper}"; notification = false; } + { command = "${pkgs.xorg.xmodmap}/bin/xmodmap ${keyboardMap}"; notification = false; } ]; focus.mouseWarping = false;