Fixed a bug where i3's mod key was being automatically set to super if a ratpoison mode key was not selected.

This commit is contained in:
stormdragon2976 2023-03-24 17:29:18 -04:00
parent 2953ecd157
commit ce5f632bfc

11
i38.sh
View File

@ -156,14 +156,13 @@ done
# Configuration questions # Configuration questions
export i3Mode=$(yesno "Would you like to use ratpoison mode? This behaves more like strychnine, with an escape key followed by keybindings.") 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 # Prevent setting ratpoison mode key to the same as default mode key
while [[ "$escapeKey" == "$mod" ]]; do while [[ "$escapeKey" == "$mod" ]]; do
escapeKey="$(menulist "Ratpoison mode key:" Control+t Control+z Control+Escape Alt+Escape Control+Space Super)" if [[ $i3Mode -eq 0 ]]; then
escapeKey="${escapeKey//Alt/Mod1}" escapeKey="$(menulist "Ratpoison mode key:" Control+t Control+z Control+Escape Alt+Escape Control+Space Super)"
escapeKey="${escapeKey//Super/Mod4}" escapeKey="${escapeKey//Alt/Mod1}"
escapeKey="${escapeKey//Super/Mod4}"
fi
mod="$(menulist "I3 mod key, for top level bindings:" Alt Control Super)" mod="$(menulist "I3 mod key, for top level bindings:" Alt Control Super)"
mod="${mod//Alt/Mod1}" mod="${mod//Alt/Mod1}"
mod="${mod//Super/Mod4}" mod="${mod//Super/Mod4}"