fix(menu): release Left from kb-move-char-back before binding it to Back
Some checks failed
Check / eval (push) Failing after 8m34s
Some checks failed
Check / eval (push) Failing after 8m34s
rofi hard-fails on a duplicate keybinding and reports it in a GUI error dialog, not stderr — so 05bab55's Left=Back killed every menu entry point on a real session while passing all stubbed tests. Rebind kb-move-char-back to Control+b in both rofi_menu copies (menu + vpn). V3 on the migrated T14s: error dialog reproduced with old flags, menu renders with fixed flags. Journal + two PROPOSED pitches (EasyEffects 8 tray icon, parallel fingerprint/password PAM). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -240,6 +240,10 @@ let
|
||||
# the whole menu. Free-text prompts should treat "$BACK" as cancel.
|
||||
# Pass --grid as the first arg to skip Left=Back (multi-column theme
|
||||
# picker needs Left for column motion).
|
||||
# Left is bound to kb-move-char-back by default and rofi hard-fails
|
||||
# on a duplicate binding (error dialog, no menu) — every binding we
|
||||
# steal must be released from its default first (Ctrl+b remains for
|
||||
# cursor motion in text prompts).
|
||||
rofi_menu() {
|
||||
local out rc left_back=1
|
||||
if [ "''${1:-}" = --grid ]; then
|
||||
@@ -247,7 +251,8 @@ let
|
||||
shift
|
||||
fi
|
||||
if [ "$left_back" -eq 1 ]; then
|
||||
out=$(command rofi -dmenu -i -kb-custom-1 Left "$@" </dev/stdin)
|
||||
out=$(command rofi -dmenu -i -kb-move-char-back Control+b \
|
||||
-kb-custom-1 Left "$@" </dev/stdin)
|
||||
else
|
||||
out=$(command rofi -dmenu -i "$@" </dev/stdin)
|
||||
fi
|
||||
@@ -1207,7 +1212,10 @@ ${themeRows}
|
||||
# VPN submenu died with "rofi_menu: command not found").
|
||||
rofi_menu() {
|
||||
local out rc
|
||||
out=$(command rofi -dmenu -i -kb-custom-1 Left "$@" </dev/stdin)
|
||||
# Release Left from kb-move-char-back first — rofi hard-fails on a
|
||||
# duplicate binding (same fix as the menu's rofi_menu above).
|
||||
out=$(command rofi -dmenu -i -kb-move-char-back Control+b \
|
||||
-kb-custom-1 Left "$@" </dev/stdin)
|
||||
rc=$?
|
||||
if [ "$rc" -eq 10 ]; then
|
||||
printf '%s\n' "$BACK"
|
||||
|
||||
Reference in New Issue
Block a user