Last active
March 16, 2019 00:42
-
-
Save rehno-lindeque/1b27db45e445c0efccb086624bbd4205 to your computer and use it in GitHub Desktop.
My personal keyboard layout switcher: nix-env -iE "$(curl -sL https://git.io/fjvfP)"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env -S nix-env -if | |
{ pkgs ? import <nixpkgs> {}, ... }: | |
let | |
norman-layout = pkgs.fetchurl { | |
url = "https://gist.githubusercontent.com/rehno-lindeque/ad5fef21f15ad13a9a355bbbd41fdc0a/raw/aa7948603ee266bd2a0bb6c9778ae7dd8bd1eccb/xmodmap.norman"; | |
sha256 = "14a63as7i35g6gkf0sqb324ck9k61w1vsdnz30sf8svnp4c0wjgq"; | |
}; | |
in | |
{ | |
norman = pkgs.writeScriptBin "norman" '' | |
${pkgs.xorg.xmodmap}/bin/xmodmap ${norman-layout} | |
''; | |
jlimaj = pkgs.writeScriptBin "jlimaj" '' | |
${pkgs.xorg.xmodmap}/bin/xmodmap ${norman-layout} | |
''; | |
qwerty = pkgs.writeScriptBin "qwerty" '' | |
${pkgs.xorg.setxkbmap}/bin/setxkbmap us | |
''; | |
qwdfkj = pkgs.writeScriptBin "qwdfkj" '' | |
${pkgs.xorg.setxkbmap}/bin/setxkbmap us | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment