Skip to content

bug: hyprland.lua Super+M exit fallback uses invalid hyprctl dispatch syntax #66

@stanfish06

Description

@stanfish06

Same class of bug as #63 (DPMS dispatch). The Super+M keybind in hyprland/hyprland.lua has a broken fallback:

hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch 'hl.dsp.exit()'"))

hl.dsp.exit() is a Hyprland Lua API call — it only works inside hyprland.lua's runtime. Passing it as a string argument to hyprctl dispatch silently does nothing. If hyprshutdown is not installed, Super+M will fail to exit Hyprland.

The correct hyprctl dispatch keyword for exiting is just exit:

-hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch 'hl.dsp.exit()'"))
+hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch exit"))

Fix is in the open PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions