diff --git a/desktopenvs/hyprdrive/orbit-menu/actions.py b/desktopenvs/hyprdrive/orbit-menu/actions.py index e0838a1..86fe63c 100644 --- a/desktopenvs/hyprdrive/orbit-menu/actions.py +++ b/desktopenvs/hyprdrive/orbit-menu/actions.py @@ -20,8 +20,14 @@ from lib.proc import fire def launch(cmd: str) -> None: """Run cmd via Hyprland's exec dispatcher — cmd may carry a `[tag ...]` / - `[workspace ...]` window-rule-on-launch prefix, same as binds.lua.""" - fire(["hyprctl", "dispatch", "exec", cmd]) + `[workspace ...]` window-rule-on-launch prefix, same as binds.lua. + + NB: `hyprctl dispatch` evaluates its argument as Lua here (hyprlua), so this + must go through `hl.dsp.exec_cmd(...)` — NOT the native `dispatch exec ` + form, which Lua parses as a syntax error and silently drops (see binds.lua's + `hl.dsp.exec_cmd("[tag +mixer] ...")`).""" + esc = cmd.replace("\\", "\\\\").replace('"', '\\"') + fire(["hyprctl", "dispatch", f'hl.dsp.exec_cmd("{esc}")']) def hyprshutdown(post_cmd: str | None = None) -> None: