Created
February 21, 2021 16:26
-
-
Save MurzNN/b3b62d3fdd51bb65226f60e51cf09984 to your computer and use it in GitHub Desktop.
Changing keyboard layout in Linux KDE + Electron apps via Alt+Shift workaround
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
# Add this to file in home folder | |
"~/bin/layout-switch.sh" | |
Alt + Shift_L |
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 | |
# 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