From 67c5ce580323abd8a455a5ce9656d600745229b4 Mon Sep 17 00:00:00 2001 From: Jeremiah Ticket Date: Wed, 30 Nov 2022 09:31:45 -0700 Subject: [PATCH] Fixed formatting and made the conflict use dialog. --- i38.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/i38.sh b/i38.sh index b7bd6a6..7cbbf98 100755 --- a/i38.sh +++ b/i38.sh @@ -146,16 +146,16 @@ done # Configuration questions #Prevent setting ratpoison mode key to the same as default mode key -while [ "$escapeKey" == "$mod" ]; do -escapeKey="$(menulist "Ratpoison mode key:" Control+t Control+z Control+Escape Alt+Escape Control+Space Super)" -escapeKey="${escapeKey//Alt/Mod1}" -escapeKey="${escapeKey//Super/Mod4}" -mod="$(menulist "I3 mod key, for top level bindings:" Alt Control Super)" -mod="${mod//Alt/Mod1}" -mod="${mod//Super/Mod4}" -if [ "$escapeKey" == "$mod" ]; then -echo "Sorry, these cannot be the same key." -fi +while [[ "$escapeKey" == "$mod" ]]; do + escapeKey="$(menulist "Ratpoison mode key:" Control+t Control+z Control+Escape Alt+Escape Control+Space Super)" + escapeKey="${escapeKey//Alt/Mod1}" + escapeKey="${escapeKey//Super/Mod4}" + mod="$(menulist "I3 mod key, for top level bindings:" Alt Control Super)" + mod="${mod//Alt/Mod1}" + mod="${mod//Super/Mod4}" + if [ "$escapeKey" == "$mod" ]; then + dialog --title "I38" --msgbox "Ratpoison and mod key cannot be the same key." -1 -1 + fi done # Volume jump volumeJump=$(rangebox "How much should pressing the volume keys change the volume?" 1 15 5)