Last active
December 24, 2015 23:19
-
-
Save apux/6879834 to your computer and use it in GitHub Desktop.
change kde keyboard layout
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/sh | |
# query xkb map: us,latam -> us is primary; latam,us -> latam is primary | |
dummy=`setxkbmap -query | grep us,latam` | |
# return value 0: us,latam; return value != 0, latam,us | |
if [ $? -ne 0 ]; then | |
# latam is primary, now make us primary in list | |
setxkbmap -model pc101 -layout us,latam -variant nodeadkeys | |
else | |
# us is primary, now make latam primary in list | |
setxkbmap -model pc101 -layout latam,us -variant nodeadkeys | |
fi | |
# taken from kate-editor.org/2013/10/07/multiple-keyboard-layouts-and-shortcuts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment