From 9d64d98a774a7b5bab0d088e5b99985d52c6ee30 Mon Sep 17 00:00:00 2001 From: aaron-gh Date: Wed, 30 Nov 2022 14:45:44 +0000 Subject: [PATCH] Added a check to prevent both ratpoison key and default mode key from being set to Super (Mod4) --- i38.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/i38.sh b/i38.sh index aa5f5f3..f1d30b2 100755 --- a/i38.sh +++ b/i38.sh @@ -145,12 +145,19 @@ while getopts "${args}" i ; do 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 +done # Volume jump volumeJump=$(rangebox "How much should pressing the volume keys change the volume?" 1 15 5) # Web browser