From ce5f632bfcf45d153a7151c2bbe0ec032baa33d5 Mon Sep 17 00:00:00 2001 From: stormdragon2976 Date: Fri, 24 Mar 2023 17:29:18 -0400 Subject: [PATCH] Fixed a bug where i3's mod key was being automatically set to super if a ratpoison mode key was not selected. --- i38.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/i38.sh b/i38.sh index b57b46f..8982625 100755 --- a/i38.sh +++ b/i38.sh @@ -156,14 +156,13 @@ done # Configuration questions export i3Mode=$(yesno "Would you like to use ratpoison mode? This behaves more like strychnine, with an escape key followed by keybindings.") -if [[ $i3Mode -eq 1 ]]; then - mod="Mod4" -fi # 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}" + if [[ $i3Mode -eq 0 ]]; then + escapeKey="$(menulist "Ratpoison mode key:" Control+t Control+z Control+Escape Alt+Escape Control+Space Super)" + escapeKey="${escapeKey//Alt/Mod1}" + escapeKey="${escapeKey//Super/Mod4}" + fi mod="$(menulist "I3 mod key, for top level bindings:" Alt Control Super)" mod="${mod//Alt/Mod1}" mod="${mod//Super/Mod4}"