Created
July 9, 2014 08:26
-
-
Save zvictor/193b567c14b5b6a679fe to your computer and use it in GitHub Desktop.
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/zvictor/ | |
XAUTHORITY=$HOME/.Xauthority | |
export DISPLAY XAUTHORITY HOME | |
usbkbd_ids=`xinput -list | grep "Keyboard" | awk -F'=' '{print $2}' | cut -c 1-2` | |
usbkbd_layout="dk" | |
for ID in $usbkbd_ids; do | |
gsettings set org.gnome.settings-daemon.plugins.keyboard active false | |
sleep 2 | |
setxkbmap -device "${ID}" -layout "${usbkbd_layout}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Script to be used along the solution pointed by @Sadi on stackoverflow 1 and stackoverflow 2 to make an extra keyboard have a specific and different layout than the laptop's one.