diff options
author | Griffin Smith <grfn@gws.fyi> | 2020-12-01T16·57-0500 |
---|---|---|
committer | glittershark <grfn@gws.fyi> | 2020-12-01T17·17+0000 |
commit | 902bf5bdd9d1e6810b23c498ceda053d163baced (patch) | |
tree | d82d2af248c5a10f090c24c2dfd162948d928aca /users/glittershark/system/home/machines | |
parent | 6ecd36f4251d88740f32b428e78df639016df9be (diff) |
feat(gs/yeren): Swap caps+escape on built-in keyboard r/1976
This actually appears to be working this time! Change-Id: I3e10eb7e1621a050e024b8b53313f13d44a999ae Reviewed-on: https://cl.tvl.fyi/c/depot/+/2217 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
Diffstat (limited to 'users/glittershark/system/home/machines')
-rw-r--r-- | users/glittershark/system/home/machines/yeren.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/users/glittershark/system/home/machines/yeren.nix b/users/glittershark/system/home/machines/yeren.nix index 43f59d375159..bcb1d188f40a 100644 --- a/users/glittershark/system/home/machines/yeren.nix +++ b/users/glittershark/system/home/machines/yeren.nix @@ -1,5 +1,9 @@ { pkgs, lib, config, ... }: +let + laptopKeyboardId = "5"; +in + { imports = [ ../platforms/linux.nix @@ -14,4 +18,33 @@ wirelessInterface = "wlp0s20f3"; i3FontSize = 9; }; + + home.packages = with pkgs; [ + zoom-us + slack + ]; + + systemd.user.services.laptop-keyboard = { + Unit = { + Description = "Swap caps+escape and alt+super, but only on the built-in laptop keyboard"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + + Install = { WantedBy = [ "graphical-session.target" ]; }; + + Service = { + Type = "oneshot"; + RemainAfterExit = true; + ExecStart = ( + "${pkgs.xorg.setxkbmap}/bin/setxkbmap " + + "-device ${laptopKeyboardId} " + + "-option caps:swapescape " + + "-option compose:ralt " + + "-option altwin:swap_alt_win" + ); + }; + }; + + xsession.windowManager.i3.config.keybindings.F9 = "exec lock"; } |