diff options
Diffstat (limited to 'configs/mate-openrc/root-image/root/.keymap.sh')
-rwxr-xr-x | configs/mate-openrc/root-image/root/.keymap.sh | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/configs/mate-openrc/root-image/root/.keymap.sh b/configs/mate-openrc/root-image/root/.keymap.sh new file mode 100755 index 0000000..ddd5c62 --- /dev/null +++ b/configs/mate-openrc/root-image/root/.keymap.sh @@ -0,0 +1,116 @@ +#!/bin/bash + +list_keymaps() { +cat <<EOM +af +al +am +ara +at +au +az +ba +be +bg +bn +br +brai +bt +bw +by +ca +cd +ch +cm +cn +cz +de +dk +dz +ee +epo +es +et +fi +fo +fr +gb +ge +gh +gn +gr +hr +hu +id +ie +il +in +iq +ir +is +it +jp +ke +kg +kh +kr +kz +la +latam +lk +lt +lv +ma +mao +md +me +mk +ml +mm +mn +mt +mv +my +nec_vndr/jp +ng +nl +no +np +ph +pk +pl +pt +ro +rs +ru +se +si +sk +sn +sy +tg +th +tj +tm +tr +tw +tz +ua +us +uz +vn +za +EOM +} + +#Comprobe if X11 keymap was selected +code=$(cat .codecheck | grep XKBMAP= | cut -d '=' -f 2) +if [ $code = "us" ]; then + keymap=$(zenity --list --title="Select your keymap" --column="Keymap" $(list_keymaps)) + + setxkbmap $keymap + + #Save XKBMAP in .codecheck to use in other time. For example if you install X11 with scripts + sed -i '/XKBMAP=./d' ~/.codecheck + echo "XKBMAP=$keymap" >> ~/.codecheck +fi |