fix(astal-menu): focus windows via hyprlua dispatcher, not native focuswindow
The Open-windows taskbar dispatched `hyprctl dispatch focuswindow address:…`,
but this is a hyprlua setup where `hyprctl dispatch` evaluates its argument as
Lua — so the native dispatcher syntax raised a Lua parse error and nothing
happened. Switch to `hl.dsp.focus({ window = "address:…" })`, the hyprlua focus
dispatcher, which focuses the window and switches to its workspace. Verified it
moves across workspaces end-to-end.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XUWCXM4KhjRkwheaA3X7bP
feat/astal-menu
parent
b9e80fbfbe
commit
76194980cb
|
|
@ -109,6 +109,11 @@ class Taskbar(Gtk.Box):
|
|||
def _focus(self, w) -> None:
|
||||
addr = w.get("address")
|
||||
if addr:
|
||||
run_text(["hyprctl", "dispatch", "focuswindow", f"address:{addr}"],
|
||||
# This is a hyprlua (Lua-configured Hyprland) setup: `hyprctl dispatch`
|
||||
# evaluates its argument as Lua, so the native `focuswindow address:…`
|
||||
# syntax is a Lua error. Use the hyprlua focus dispatcher, which also
|
||||
# switches to the window's workspace.
|
||||
run_text(["hyprctl", "dispatch",
|
||||
f'hl.dsp.focus({{ window = "address:{addr}" }})'],
|
||||
lambda *_a: None)
|
||||
self._on_activate()
|
||||
|
|
|
|||
Loading…
Reference in New Issue