Skip to content

Instantly share code, notes, and snippets.

@jpigree
Forked from MichaelBitard/85-typematrix.rules
Created September 27, 2017 09:22
Show Gist options
  • Save jpigree/dd3eb376f01c3eee625d9621a7a27c1d to your computer and use it in GitHub Desktop.
Save jpigree/dd3eb376f01c3eee625d9621a7a27c1d to your computer and use it in GitHub Desktop.
TypeMatrix auto set dvorak mapping when usb is plugged in
ACTION=="add", ATTR{idProduct}=="2030", RUN+="/usr/bin/set_typematrix_dvorak_mapping"
#!/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