From 4b4ae52c65b93d0ace33a696c851698c9483eceb Mon Sep 17 00:00:00 2001 From: rope Date: Sat, 1 Aug 2026 19:32:31 +0100 Subject: [PATCH] quickshell: fix pinned tiles never launching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit launchPin passed a bare DesktopEntry to activate(), but activate() started dispatching on a `kind` field when the results list became heterogeneous (apps + files + web). A bare entry has no `kind`, so every pin click fell through to the no-op branch: the tiles rendered, hovered and dragged correctly and simply never launched. Regression from "launcher searches files and the web". Wrap via appItem() so the pin takes the same path as a search result, and make activate()'s fallthrough console.warn instead of returning quietly — the silence is the only reason this survived a release. Co-Authored-By: Claude Opus 5 --- settings/quickshell.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/settings/quickshell.nix b/settings/quickshell.nix index 4cb6da2..71d7ab3 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -1575,7 +1575,14 @@ in if (item.kind === "app") item.app.execute(); else if (item.kind === "file") Quickshell.execDetached([Commands.xdgOpen, item.path]); else if (item.kind === "web") Quickshell.execDetached([Commands.xdgOpen, item.url]); - else return; + else { + // Shout rather than no-op. An unwrapped DesktopEntry + // reaching here is a caller bug, and the silent + // version of it cost an afternoon: the pin tiles + // looked fine and simply never launched anything. + console.warn("launcher: activate() got no usable kind:", JSON.stringify(item)); + return; + } open = false; } @@ -2083,8 +2090,12 @@ in pinFile.writeAdapter(); } + // Must go through appItem(): activate() dispatches on `kind`, + // so handing it a bare DesktopEntry silently does nothing. function launchPin(id) { - activate(DesktopEntries.applications.values.find(a => a.id === id)); + const app = DesktopEntries.applications.values.find(a => a.id === id); + if (app === undefined) return; + activate(appItem(app)); } // App matches for the current query, kept apart from