fix(hyprdrive/orbit-menu): launch Tools/Scripts via hl.dsp.exec_cmd
`hyprctl dispatch` evaluates its argument as Lua here (hyprlua), so the old native `dispatch exec <cmd>` 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 <noreply@anthropic.com>main
parent
a534952c1c
commit
50b80cd5ce
|
|
@ -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 <cmd>`
|
||||
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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue