-
-
Save mrbongiolo/170b9236e4641669a5128483b979f20c 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 | |
current=$(dconf read /org/gnome/desktop/input-sources/xkb-options) | |
swapped="['caps:swapescape']" | |
capslock="['caps:capslock']" | |
echo "Current status: $current" | |
if [ "$current" == "$swapped" ] | |
then | |
echo "Making caps and escape WORK NORMALLY" | |
dconf write /org/gnome/desktop/input-sources/xkb-options $capslock | |
elif [ "$current" == "$capslock" ] | |
then | |
echo "Swapping caps and escape" | |
dconf write /org/gnome/desktop/input-sources/xkb-options $swapped | |
else | |
echo "caps is not swapescaped nor capslock. Doing nothing." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment