Replace localectl list-keymaps

This commit is contained in:
MatMoul 2015-10-02 18:10:11 +02:00
parent 922ba3668f
commit 4e87907887

18
archfi
View file

@ -102,12 +102,13 @@ setkeymap(){
#for item in $items; do #for item in $items; do
# options+=("$item" "") # options+=("$item" "")
#done #done
items=$(find /usr/share/kbd/keymaps/ -type f) #items=$(find /usr/share/kbd/keymaps/ -type f)
items=$(find /usr/share/kbd/keymaps/ -type f -printf "%f\n" | sort -V)
options=() options=()
for item in $items; do for item in $items; do
item=$(basename "$item") #item=$(basename "$item")
item=${item%%.*} #item=${item%%.*}
options+=("$item" "") options+=("${item%%.*}" "")
done done
keymap=$(whiptail --backtitle "$apptitle" --title "$txtsetkeymap" --menu "" 0 0 0 \ keymap=$(whiptail --backtitle "$apptitle" --title "$txtsetkeymap" --menu "" 0 0 0 \
"${options[@]}" \ "${options[@]}" \
@ -839,12 +840,13 @@ archsetkeymap(){
#for item in $items; do #for item in $items; do
# options+=("$item" "") # options+=("$item" "")
#done #done
items=$(find /usr/share/kbd/keymaps/ -type f) #items=$(find /usr/share/kbd/keymaps/ -type f)
items=$(find /usr/share/kbd/keymaps/ -type f -printf "%f\n" | sort -V)
options=() options=()
for item in $items; do for item in $items; do
item=$(basename "$item") #item=$(basename "$item")
item=${item%%.*} #item=${item%%.*}
options+=("$item" "") options+=("${item%%.*}" "")
done done
keymap=$(whiptail --backtitle "$apptitle" --title "$txtsetkeymap" --menu "" 0 0 0 \ keymap=$(whiptail --backtitle "$apptitle" --title "$txtsetkeymap" --menu "" 0 0 0 \
"${options[@]}" \ "${options[@]}" \