From 4e8790788771941f27fd7e617d3c8faaddf8263a Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 2 Oct 2015 18:10:11 +0200 Subject: [PATCH] Replace localectl list-keymaps --- archfi | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/archfi b/archfi index 6327f9b..19e6e69 100644 --- a/archfi +++ b/archfi @@ -102,12 +102,13 @@ setkeymap(){ #for item in $items; do # options+=("$item" "") #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=() for item in $items; do - item=$(basename "$item") - item=${item%%.*} - options+=("$item" "") + #item=$(basename "$item") + #item=${item%%.*} + options+=("${item%%.*}" "") done keymap=$(whiptail --backtitle "$apptitle" --title "$txtsetkeymap" --menu "" 0 0 0 \ "${options[@]}" \ @@ -839,12 +840,13 @@ archsetkeymap(){ #for item in $items; do # options+=("$item" "") #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=() for item in $items; do - item=$(basename "$item") - item=${item%%.*} - options+=("$item" "") + #item=$(basename "$item") + #item=${item%%.*} + options+=("${item%%.*}" "") done keymap=$(whiptail --backtitle "$apptitle" --title "$txtsetkeymap" --menu "" 0 0 0 \ "${options[@]}" \