Created
February 8, 2019 01:19
-
-
Save konchunas/ab805f7ce8d883ac5befc7edc9b333e7 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/sh | |
LAYOUT_COUNT=2 | |
CURRENT_LAYOUT=$(gsettings get org.gnome.desktop.input-sources current) | |
CURRENT_LAYOUT_NUMBER=$(echo -n $CURRENT_LAYOUT | tail -c 1) | |
DESIRED_LAYOUT=$(expr $CURRENT_LAYOUT_NUMBER + 1) | |
if [ `expr $DESIRED_LAYOUT % $LAYOUT_COUNT` -eq 0 ] | |
then | |
DESIRED_LAYOUT="0" | |
fi | |
gsettings set org.gnome.desktop.input-sources current $DESIRED_LAYOUT | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment