-
-
Save jpigree/dd3eb376f01c3eee625d9621a7a27c1d to your computer and use it in GitHub Desktop.
TypeMatrix auto set dvorak mapping when usb is plugged in
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
ACTION=="add", ATTR{idProduct}=="2030", RUN+="/usr/bin/set_typematrix_dvorak_mapping" |
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
#!/bin/bash | |
{ | |
sleep 1 | |
DISPLAY=":0.0" | |
HOME=/home/mbitard/ | |
XAUTHORITY=$HOME/.Xauthority | |
export DISPLAY XAUTHORITY HOME | |
export XAUTHORITY HOME | |
ID=`xinput list | grep TypeMatrix | grep keyboard | sed 's/.*id=\([0-9]*\).*/\1/'` | |
setxkbmap -device $ID us -variant dvorak-alt-intl | |
# mapping insert on mail key | |
xmodmap -e 'keycode 163=Insert' | |
} & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment