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