From 50b80cd5cebbcea7217a7ca5227207c0ea2a44eb Mon Sep 17 00:00:00 2001 From: The_miro Date: Sun, 19 Jul 2026 16:21:28 +0200 Subject: [PATCH] fix(hyprdrive/orbit-menu): launch Tools/Scripts via hl.dsp.exec_cmd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `hyprctl dispatch` evaluates its argument as Lua here (hyprlua), so the old native `dispatch exec ` form parsed as a Lua syntax error and was silently dropped — every Tools/Scripts/Management entry failed to launch. Route through hl.dsp.exec_cmd(...) instead (matching binds.lua), keeping the [tag ...] rule prefix support. Co-Authored-By: Claude Opus 4.8 --- desktopenvs/hyprdrive/orbit-menu/actions.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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: