aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2020-11-23 15:52:40 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2020-11-23 15:52:40 +0100
commit07801f7145cb7529bbd66a160bcf5847ceab537a (patch)
tree3090a999dce5b84ccb4b2bb9bd428452ac1319b2
parent2b8430a8f5146726753bf7c12c7adcef4e19fcb9 (diff)
downloaddotfiles-07801f7145cb7529bbd66a160bcf5847ceab537a.tar.gz
dotfiles-07801f7145cb7529bbd66a160bcf5847ceab537a.zip
bin: change the keyboard layout being picked
- mi: the US keyboard layout is apparently the same as the one for the Māori keyboard language, with the advantage of being able to use macrons. Let's replace the US one with this other one. - ca: since I'm using the catalan variant, it makes more sense to show this one instead of the standard `es`. Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
-rwxr-xr-xbin/i3status.sh4
-rwxr-xr-xbin/toggle-keyboard-layout.sh8
2 files changed, 6 insertions, 6 deletions
diff --git a/bin/i3status.sh b/bin/i3status.sh
index b4e63d8..1d08b8c 100755
--- a/bin/i3status.sh
+++ b/bin/i3status.sh
@@ -24,5 +24,9 @@ i3status --config ~/.i3status.conf | while :
do
read line
LG=$(setxkbmap -query | awk '/layout/{print $2}')
+
+ if [ "$LG" = "es" ]; then
+ LG="ca"
+ fi
echo "LG: $LG | $line" || exit 1
done
diff --git a/bin/toggle-keyboard-layout.sh b/bin/toggle-keyboard-layout.sh
index 6d91258..e9095f2 100755
--- a/bin/toggle-keyboard-layout.sh
+++ b/bin/toggle-keyboard-layout.sh
@@ -18,14 +18,10 @@
# to him.
layout=$(setxkbmap -query | awk '/layout/{print $2}')
-if [ "$layout" == 'us' ]
+if [ "$layout" == 'mi' ]
then
setxkbmap es
else
- if [ "$layout" == 'es' ]; then
- setxkbmap mi
- else
- setxkbmap us
- fi
+ setxkbmap mi
fi
killall -SIGUSR1 i3status