Created
March 3, 2020 17:41
-
-
Save Archenoth/1cea9f69a61d318de9ee7e4dc7b1f67d to your computer and use it in GitHub Desktop.
A Termux keymap switcher
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/sh | |
KEYMAP=$1 | |
if [ -z "$KEYMAP" ]; then | |
KEYMAP=default | |
fi | |
if [ -f "$HOME/.termux/keymaps/$KEYMAP.properties" ]; then | |
echo "Setting keymap: $KEYMAP" | |
rm "$HOME/.termux/termux.properties" | |
ln -s "$HOME/.termux/keymaps/$KEYMAP.properties" "$HOME/.termux/termux.properties" | |
termux-reload-settings | |
exit $? | |
else | |
echo "Invalid keymap $KEYMAP, valid keymaps include:" | |
ls "$HOME/.termux/keymaps/" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment