fix(menu): repair three dead nomarchy-menu leaf actions (Pillar 9 / Component 3)
All checks were successful
Check / eval-and-lint (push) Successful in 6m41s
All checks were successful
Check / eval-and-lint (push) Successful in 6m41s
Found by driving the menu's observable actions live in a VM with the real session env imported. All three are also bound to keybindings. 1. nomarchy-hyprland-window-single-square-aspect-toggle (1-Window Ratio, SUPER CTRL BACKSPACE): read/set layout:single_window_aspect_ratio, which is "no such option" in Hyprland 0.52.1 — the option lives under dwindle:. The getoption returned nothing and the keyword set was silently dropped, so the toggle did nothing. Point it at dwindle:single_window_aspect_ratio. 2. nomarchy-hyprland-workspace-layout-toggle (Workspace Layout, SUPER L): read .tiledLayout off `hyprctl activeworkspace -j` (no such key → always null) and switched to "scrolling" (not a built-in layout — hyprctl layouts lists only dwindle/master), so it silently no-op'd. Rewrite to toggle the real general:layout between dwindle and master. 3. show_setup_menu offered Power Profile unconditionally, but powerprofilesctl is absent everywhere (power-profiles-daemon is force-off on laptop in favour of TLP and never enabled on desktop), so the entry died with "command not found". Gate it behind `command -v powerprofilesctl`. Verified (1) and (2) against live Hyprland in the VM: aspect flips [0,0]<->[1,1], layout flips dwindle<->master. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -204,7 +204,13 @@ show_font_menu() {
|
||||
}
|
||||
|
||||
show_setup_menu() {
|
||||
local options=" Audio\n Wifi\n Bluetooth\n Power Profile\n System Sleep\n Monitors"
|
||||
local options=" Audio\n Wifi\n Bluetooth"
|
||||
# Power Profile drives powerprofilesctl, which only exists when
|
||||
# power-profiles-daemon is running. Laptops force it off in favour of
|
||||
# TLP and desktops don't enable it, so gate the entry rather than
|
||||
# offer an action that dies with "command not found".
|
||||
command -v powerprofilesctl >/dev/null 2>&1 && options="$options\n Power Profile"
|
||||
options="$options\n System Sleep\n Monitors"
|
||||
[[ -f ~/.config/hypr/bindings.conf ]] && options="$options\n Keybindings"
|
||||
[[ -f ~/.config/hypr/input.conf ]] && options="$options\n Input"
|
||||
options="$options\n DNS\n Security"
|
||||
|
||||
Reference in New Issue
Block a user