From 2a96de6d27958f5e58cddd238ed24b2378b25cec Mon Sep 17 00:00:00 2001 From: Damocles Date: Sun, 12 Apr 2026 15:47:14 +0200 Subject: [PATCH 1/3] fix power menu for real this time --- modules/PowerMenu.qml | 8 ++------ modules/Wlogout.qml | 9 +++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/modules/PowerMenu.qml b/modules/PowerMenu.qml index 5c6f38f..59ab4b6 100644 --- a/modules/PowerMenu.qml +++ b/modules/PowerMenu.qml @@ -11,16 +11,12 @@ PanelWindow { required property real anchorX signal menuClosed() + signal runCommand(var cmd) readonly property bool _isNiri: Quickshell.env("NIRI_SOCKET") !== "" - Process { - id: runner - } - function _run(cmd) { - runner.command = cmd; - runner.running = true; + runCommand(cmd); menuClosed(); } diff --git a/modules/Wlogout.qml b/modules/Wlogout.qml index 2f4e9ed..32dc365 100644 --- a/modules/Wlogout.qml +++ b/modules/Wlogout.qml @@ -1,4 +1,5 @@ import QtQuick +import Quickshell import "." as M M.BarIcon { @@ -9,6 +10,10 @@ M.BarIcon { required property var bar + Process { + id: runner + } + MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor @@ -22,6 +27,10 @@ M.BarIcon { screen: root.bar.screen anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0) onMenuClosed: menuLoader.active = false + onRunCommand: cmd => { + runner.command = cmd; + runner.running = true; + } } } } From d0a6778004f7a3355c69c4f50feb7c8204cceaa2 Mon Sep 17 00:00:00 2001 From: Damocles Date: Sun, 12 Apr 2026 15:47:49 +0200 Subject: [PATCH 2/3] fix app title not updating when changing focus --- modules/WindowTitle.qml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/WindowTitle.qml b/modules/WindowTitle.qml index 8f56968..de1661a 100644 --- a/modules/WindowTitle.qml +++ b/modules/WindowTitle.qml @@ -48,9 +48,13 @@ M.BarSection { try { const ev = JSON.parse(line); if (ev.WindowFocusChanged !== undefined) { - const w = ev.WindowFocusChanged.window; - root._title = w ? (w.title || "") : ""; - root._appId = w ? (w.app_id || "") : ""; + // WindowFocusChanged only gives id, re-query for full info + if (ev.WindowFocusChanged.id !== null) + initProc.running = true; + else { + root._title = ""; + root._appId = ""; + } } else if (ev.WindowOpenedOrChanged !== undefined) { const w = ev.WindowOpenedOrChanged.window; if (w.is_focused) { From 24c90dae11c5b64345db6b797f99d6d730a21fb1 Mon Sep 17 00:00:00 2001 From: Damocles Date: Sun, 12 Apr 2026 15:49:45 +0200 Subject: [PATCH 3/3] fix power profile jittery --- modules/PowerProfile.qml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/PowerProfile.qml b/modules/PowerProfile.qml index 236437a..904492f 100644 --- a/modules/PowerProfile.qml +++ b/modules/PowerProfile.qml @@ -51,9 +51,7 @@ M.BarIcon { onClicked: { const cycle = ["performance", "balanced", "power-saver"]; const idx = cycle.indexOf(root.profile); - const next = cycle[(idx + 1) % cycle.length]; - root.profile = next; - setter.next = next; + setter.next = cycle[(idx + 1) % cycle.length]; setter.running = true; } }