From cf9066cdc59121ef886b1d07f1d3c937c44ff701 Mon Sep 17 00:00:00 2001 From: Amy Date: Wed, 8 Dec 2021 21:15:40 +0100 Subject: [PATCH] made keyboard select use dialog --- citrine.internal.sh | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/citrine.internal.sh b/citrine.internal.sh index f941baa..9182505 100755 --- a/citrine.internal.sh +++ b/citrine.internal.sh @@ -53,18 +53,9 @@ echo "KBD=$KBD" # TODO: layout select in dialog if [[ "$KBD" == "0" || "$KBD" == "0" ]]; then - prompt "We're going to show the list of keymaps in less. Do you know how to exit less? (Y/n)" - UL="$response" - if [[ "$UL" == "n" ]]; then - inf "Once we enter less, use arrows to scroll, and q to quit once you've found the right file." - inf "Press enter to go" - read - fi - localectl list-keymaps - prompt "Correct keymap" - KMP="$response" - echo "KMP=$response" - loadkeys ${KMP} + keymaps=$(localectl list-keymaps | tr '\n' ' ' | sed 's/ /" "" "/g') + keymap=$(dialog --title "Citrine" --menu "Select your keyboard layout" 10 80 0 $keymaps "" --stdout) + fi clear