-
-
Save fomigo/e87062e02432ceed76b395f66dc70aba to your computer and use it in GitHub Desktop.
Changing keyboard layout in Linux KDE + Electron apps via Alt+Shift workaround
This file contains hidden or 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
# Add this to file in home folder | |
"~/bin/layout-switch.sh" | |
Alt + Shift_L |
This file contains hidden or 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 | |
# Place this file to ~/bin/layout-switch.sh | |
LAYOUT_CURRENT=$(setxkbmap -print | awk -F + '/xkb_symbols/ {print $2}') | |
if [ "$LAYOUT_CURRENT" == "ru" ]; then | |
/usr/bin/setxkbmap us,ru | |
else | |
/usr/bin/setxkbmap ru,us | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment