From 9c1fea2cb7b13044c2c330d6ac267a724b4657e4 Mon Sep 17 00:00:00 2001 From: Tom Ballard Date: Mon, 30 Nov 2026 14:56:50 +0000 Subject: [PATCH 1/3] Back off the clipboard watcher when wl-paste is missing Without wl-clipboard the watcher exits 127 straight away, and the 2 s restart turned that into a new process every two seconds for as long as the shell ran. Exit 127 now waits a minute before trying again; any other exit still restarts after 2 s. Co-Authored-By: Claude Opus 5.5 --- services/ClipboardWatcher.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/ClipboardWatcher.qml b/services/ClipboardWatcher.qml index 326911b..e7891fe 100644 --- a/services/ClipboardWatcher.qml +++ b/services/ClipboardWatcher.qml @@ -98,6 +98,9 @@ fi onExited: function(exitCode) { if (!watcher.wanted) return watcher.message("warning", "clipboard watcher exited (" + exitCode + "); restarting") + // 127 is wl-paste missing (wl-clipboard not installed): retry once a + // minute rather than spawning a process every 2 s for nothing. + restartTimer.interval = exitCode === 127 ? 60000 : 2000 restartTimer.restart() } } From eda459facbeee16e8cf9af257fa9ab7f92fc0f39 Mon Sep 17 00:00:00 2001 From: Tom Ballard Date: Mon, 30 Nov 2026 14:56:50 +0000 Subject: [PATCH 2/3] Open the launcher under compositors other than Hyprland contentReady waited for a Hyprland monitor matching the output and for its scale, so under labwc, sway or any other wlroots compositor the launcher mapped but never showed its card. When HYPRLAND_INSTANCE_SIGNATURE is unset, skip the focused-monitor lookup, the monitor and scale checks, refreshMonitors and the omacast submap; the surface having the output's size is enough. Under Hyprland nothing changes. Co-Authored-By: Claude Opus 5.5 --- tests/content-ready.test.js | 11 +++++++++++ ui/LauncherWindow.qml | 18 ++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/tests/content-ready.test.js b/tests/content-ready.test.js index d5123e3..e2b8690 100644 --- a/tests/content-ready.test.js +++ b/tests/content-ready.test.js @@ -17,6 +17,7 @@ function contentReady(window) { function shownOn(scale, devicePixelRatio) { const screen = { name: "HDMI-A-1", width: 2400, height: 1350 } return { + usingHyprland: true, shown: true, screen, targetMonitor: { name: screen.name, scale }, @@ -42,3 +43,13 @@ test("content stays hidden until the surface has the output's size", () => { assert.equal(contentReady({ ...shownOn(0.8, 1), width: 1920 }), false) assert.equal(contentReady({ ...shownOn(1, 1), shown: false }), false) }) + +// Under another compositor (labwc, sway, …) there is no Hyprland monitor to +// wait for: the surface having the output's size is enough. +test("content is revealed without Hyprland once the surface has the output's size", () => { + const screen = { name: "DSI-1", width: 375, height: 667 } + const window = { usingHyprland: false, shown: true, screen, targetMonitor: null, width: 375, height: 667, devicePixelRatio: 2 } + assert.equal(contentReady(window), true) + assert.equal(contentReady({ ...window, height: 600 }), false) + assert.equal(contentReady({ ...window, shown: false }), false) +}) diff --git a/ui/LauncherWindow.qml b/ui/LauncherWindow.qml index f88b8f6..17c4125 100644 --- a/ui/LauncherWindow.qml +++ b/ui/LauncherWindow.qml @@ -46,8 +46,11 @@ PanelWindow { visible: window.mapped screen: window.pinnedScreen property var pinnedScreen: null + // Under another compositor (labwc, sway, …) there is no Hyprland: no + // focused monitor, no monitor scale to wait for, no submaps. + readonly property bool usingHyprland: !!Quickshell.env("HYPRLAND_INSTANCE_SIGNATURE") function focusedScreen() { - var monitor = Hyprland.focusedMonitor + var monitor = window.usingHyprland ? Hyprland.focusedMonitor : null var screens = Quickshell.screens for (var i = 0; i < screens.length; i++) { if (monitor && screens[i].name === monitor.name) return screens[i] @@ -209,17 +212,20 @@ PanelWindow { // mapping at scale 1, which showed stretched and soft, with scale-dependent // sizes jumping as the real scale landed. readonly property var targetMonitor: { + if (!window.usingHyprland) return null var monitors = Hyprland.monitors.values for (var i = 0; i < monitors.length; i++) { if (window.screen && monitors[i].name === window.screen.name) return monitors[i] } return null } - readonly property bool contentReady: window.shown && !!window.screen && !!window.targetMonitor + readonly property bool contentReady: window.shown && !!window.screen + && (!window.usingHyprland || !!window.targetMonitor) && window.width === window.screen.width && window.height === window.screen.height // Qt keeps devicePixelRatio at 1 on an output scaled below 1 (0.8 here), so // the plain comparison never held there and the card stayed invisible. - && Math.round(window.devicePixelRatio * 120) === Math.round(Math.max(1, window.targetMonitor.scale) * 120) + && (!window.usingHyprland + || Math.round(window.devicePixelRatio * 120) === Math.round(Math.max(1, window.targetMonitor.scale) * 120)) property bool contentRevealed: false onContentReadyChanged: { window.contentRevealed = false @@ -228,7 +234,7 @@ PanelWindow { if (window.contentReady) Qt.callLater(function() { if (window.contentReady) window.contentRevealed = true }) } // Live monitor scaling emits no Hyprland event, so refresh the cached scale. - onDevicePixelRatioChanged: if (window.shown) Hyprland.refreshMonitors() + onDevicePixelRatioChanged: if (window.shown && window.usingHyprland) Hyprland.refreshMonitors() // Also what keeps the mapped surface blank while hidden: contentReady needs shown. Binding { target: window.contentItem @@ -237,10 +243,10 @@ PanelWindow { } // A reload or disable while shown would otherwise leave Hyprland in the submap. - Component.onDestruction: if (window.shown) Hyprland.dispatch('hl.dsp.submap("reset")') + Component.onDestruction: if (window.shown && window.usingHyprland) Hyprland.dispatch('hl.dsp.submap("reset")') onShownChanged: { // The "omacast" submap (omacast.lua) lets Super+J/K past Hyprland's binds. - Hyprland.dispatch('hl.dsp.submap("' + (window.shown ? "omacast" : "reset") + '")') + if (window.usingHyprland) Hyprland.dispatch('hl.dsp.submap("' + (window.shown ? "omacast" : "reset") + '")') if (window.shown) { var target = window.focusedScreen() // An output that goes away (lid, suspend, dock) takes the layer surface From cb647e810d3f065541c09e209dbdd454c78eda96 Mon Sep 17 00:00:00 2001 From: Tom Ballard Date: Mon, 30 Nov 2026 14:56:50 +0000 Subject: [PATCH 3/3] Keep the card at the top on narrow screens On a screen under 500 px wide (a phone, or a small portrait display) the card sits just under the bar instead of a quarter of the way down, so the search field and the first results stay above an on-screen keyboard. Its full height is measured from there, leaving one gap at the bottom. Wider screens keep today's placement. Co-Authored-By: Claude Opus 5.5 --- ui/LauncherWindow.qml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ui/LauncherWindow.qml b/ui/LauncherWindow.qml index 17c4125..da9c20d 100644 --- a/ui/LauncherWindow.qml +++ b/ui/LauncherWindow.qml @@ -167,7 +167,14 @@ PanelWindow { : "Search for apps and commands…" readonly property int cardWidth: Math.min(px(750), width - Style.gapsOut * 2) - readonly property int fullHeight: Math.min(px(475), height - Style.gapsOut * 2) + // On a narrow screen (a phone or a small portrait display) the card sits at + // the top, just under the bar, leaving the lower half free for an + // on-screen keyboard, instead of a quarter of the way down. + readonly property bool narrow: width < px(500) + readonly property int narrowTop: Style.bar.sizeHorizontal + Style.gapsOut + readonly property int fullHeight: window.narrow + ? Math.min(px(475), height - window.narrowTop - Style.gapsOut) + : Math.min(px(475), height - Style.gapsOut * 2) readonly property int headerHeight: px(66) readonly property int footerHeight: px(42) @@ -894,7 +901,8 @@ PanelWindow { height: window.compact ? window.headerHeight + card.borderTop + card.borderBottom : window.fullHeight radius: Style.cornerRadius anchors.horizontalCenter: parent.horizontalCenter - y: Math.max(Style.gapsOut, Math.min(Math.round(window.height / 4), window.height - window.fullHeight - Style.gapsOut)) + y: window.narrow ? window.narrowTop + : Math.max(Style.gapsOut, Math.min(Math.round(window.height / 4), window.height - window.fullHeight - Style.gapsOut)) color: window.cardBackground borderSpec: window.borderSpec clip: true