Choose to change keyboard layout or not

Let the user choose if they want to change keyboard layout or not
This commit is contained in:
Le0xFF 2022-07-06 10:37:52 +02:00
parent 5ab08288e2
commit b017a5b432

View File

@ -22,7 +22,12 @@ function check_if_run_as_root () {
function set_keyboard_layout () { function set_keyboard_layout () {
echo -e -n "\nPress any key to list all the keyboard layouts, move with arrow keys and press \"q\" to exit the list." echo
read -n 1 -r -p "Do you want to change your keyboard layout? (y/n): " yn
if [[ "${yn}" == "y" ]] || [[ "${yn}" == "Y" ]] ; then
echo -e -n "\n\nPress any key to list all the keyboard layouts, move with arrow keys and press \"q\" to exit the list."
read -n 1 key read -n 1 key
echo echo
@ -49,6 +54,9 @@ function set_keyboard_layout () {
done done
elif [[ "${yn}" == "n" ]] || [[ "${yn}" == "N" ]] ; then
echo -e "\n\nKeeping the previous keyboard layout."
fi
} }
function connect_to_wifi () { function connect_to_wifi () {