From 6f5cbba6672d46db0a2e0b44d8ba9ec36bb058e1 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Mon, 31 Aug 2026 13:38:21 -0400 Subject: [PATCH] fixing selection --- .../quickshell/overview/OverviewWindow.qml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/configs/fwbook/quickshell/overview/OverviewWindow.qml b/configs/fwbook/quickshell/overview/OverviewWindow.qml index 6091db8..dd0c33c 100644 --- a/configs/fwbook/quickshell/overview/OverviewWindow.qml +++ b/configs/fwbook/quickshell/overview/OverviewWindow.qml @@ -90,12 +90,24 @@ PanelWindow { } } + // This Hyprland build no longer accepts classic freeform dispatch text + // ("focuswindow address:0x...") at all — `hyprctl dispatch ` always + // evaluates as a Lua expression (`hl.dispatch()`), so the + // text itself must already be a valid hl.dsp.* dispatcher call. Verified + // directly against this host: `hl.dsp.focus({workspace = N})` and + // `hl.dsp.focus({window = "address:0x..."})` both work; the classic + // `focuswindow address:...` / `workspace N` forms both error out. function activateSelection() { const row = root.rows[root.selectedRow]; if (!row) { root.requestClose(); return; } - if (!row.workspace.active) Hyprland.dispatch("workspace " + row.workspace.id); + if (!row.workspace.active) { + Quickshell.execDetached(["hyprctl", "dispatch", `hl.dsp.focus({workspace = ${row.workspace.id}})`]); + } const tl = row.toplevels[root.selectedCol]; - if (tl) Hyprland.dispatch("focuswindow address:" + tl.address); + if (tl) { + const addr = tl.address.startsWith("0x") ? tl.address : "0x" + tl.address; + Quickshell.execDetached(["hyprctl", "dispatch", `hl.dsp.focus({window = "address:${addr}"})`]); + } root.requestClose(); }