diff --git a/desktopenvs/hyprlua/astal-menu/ui/taskbar.py b/desktopenvs/hyprlua/astal-menu/ui/taskbar.py index 84b00df..9836df7 100644 --- a/desktopenvs/hyprlua/astal-menu/ui/taskbar.py +++ b/desktopenvs/hyprlua/astal-menu/ui/taskbar.py @@ -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()