From 07801f7145cb7529bbd66a160bcf5847ceab537a Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 23 Nov 2020 15:52:40 +0100 Subject: bin: change the keyboard layout being picked MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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à --- bin/i3status.sh | 4 ++++ bin/toggle-keyboard-layout.sh | 8 ++------ 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 -- cgit v1.2.3