From 13c752644092de1017096b67a0c82ed6451419b0 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Tue, 11 Nov 2025 00:31:21 -0500 Subject: [PATCH 1/4] compat: update `hyprlock` flags --- config/Config.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/Config.qml b/config/Config.qml index 9050fa0..d8b9e22 100644 --- a/config/Config.qml +++ b/config/Config.qml @@ -128,7 +128,6 @@ Singleton { } readonly property QtObject notifs: QtObject { - readonly property bool expire: true readonly property int defaultExpireTimeout: 5000 readonly property real clearThreshold: 0.3 @@ -176,7 +175,7 @@ Singleton { readonly property real buttonSize: 64 property list logout: ["hyprctl", "dispatch", "exit"] - property list lock: ["hyprlock", "--immediate"] + property list lock: ["hyprlock"] property list suspend: ["systemctl", "suspend"] property list hibernate: ["systemctl", "suspend-then-hibernate"] property list sleep: suspend From f62e0175365bf9cb7883d423b0f9c9903eeb077f Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Tue, 11 Nov 2025 00:32:09 -0500 Subject: [PATCH 2/4] feat(dashboard): adjust performance warning color --- modules/dashboard/Performance.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/dashboard/Performance.qml b/modules/dashboard/Performance.qml index 39c51d4..5e7afab 100644 --- a/modules/dashboard/Performance.qml +++ b/modules/dashboard/Performance.qml @@ -107,7 +107,7 @@ ColumnLayout { Column { anchors.centerIn: parent - readonly property color color: res.warning1 ? Color.mute(Config.colors.error, 1.3, 1.2) : + readonly property color color: res.warning1 ? Color.mute(Config.colors.error, 1.2, 1.1) : res.value1 === 0 ? Config.colors.inactive : Config.colors.primary CustomText { @@ -133,7 +133,7 @@ ColumnLayout { anchors.horizontalCenterOffset: -res.thickness / 2 anchors.topMargin: res.thickness / 2 + 5 - readonly property color color: res.warning2 ? Color.mute(Config.colors.error, 1.3, 1.2) : + readonly property color color: res.warning2 ? Color.mute(Config.colors.error, 1.2, 1.1) : res.value2 === 0 ? Config.colors.inactive : Config.colors.primary CustomText { From e82bdbc9a2bb0c55a2d0a74c0e743130339a350f Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Tue, 11 Nov 2025 00:32:48 -0500 Subject: [PATCH 3/4] fix: panel interaction hitbox code --- modules/ui/Interactions.qml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/ui/Interactions.qml b/modules/ui/Interactions.qml index 980dae2..f3d601e 100644 --- a/modules/ui/Interactions.qml +++ b/modules/ui/Interactions.qml @@ -21,29 +21,32 @@ CustomMouseArea { property bool dashboardShortcutActive anchors.fill: parent + // HACK: Fixes weird pixel alignment issues that drop mouse events + anchors.rightMargin: -1 + anchors.bottomMargin: -1 + hoverEnabled: true function withinPanelWidth(panel: Item, x: real): bool { - const panelX = panel.x; + const panelX = panel.x + Config.border.thickness; return x >= panelX - Config.border.rounding && x <= panelX + panel.width + Config.border.rounding; } function withinPanelHeight(panel: Item, y: real): bool { - const panelY = panel.y; - return y >= panelY + Config.bar.height - Config.border.rounding - && y <= panelY + panel.height + Config.bar.height + Config.border.rounding; + const panelY = panel.y + Config.bar.height; + return y >= panelY - Config.border.rounding && y <= panelY + panel.height + Config.border.rounding; } function inBottomPanel(panel: Item, x: real, y: real): bool { - return y > root.height - Config.border.thickness - panel.height - Config.border.rounding && withinPanelWidth(panel, x); + return y > panel.y + Config.bar.height && withinPanelWidth(panel, x); } function inLeftPanel(panel: Item, x: real, y: real): bool { - return x < Config.border.thickness + panel.x + panel.width && withinPanelHeight(panel, y); + return x < panel.x + panel.width + Config.border.thickness && withinPanelHeight(panel, y); } function inRightPanel(panel: Item, x: real, y: real): bool { - return x > Config.border.thickness + panel.x && withinPanelHeight(panel, y); + return x > panel.x + Config.border.thickness && withinPanelHeight(panel, y); } // Handling Mouse Input From c9e7e7022b982f0dc05f2e5c16d390c7f0c9bcb2 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Tue, 11 Nov 2025 00:33:44 -0500 Subject: [PATCH 4/4] feat: use Quickshell-internal idle inhibitor This was a pain to set up properly... --- modules/bar/popouts/IdleInhibit.qml | 2 +- modules/ui/UI.qml | 1 + modules/ui/UIState.qml | 5 +++- services/Idle.qml | 41 ++++++++--------------------- 4 files changed, 17 insertions(+), 32 deletions(-) diff --git a/modules/bar/popouts/IdleInhibit.qml b/modules/bar/popouts/IdleInhibit.qml index 68ab17c..f154dd1 100644 --- a/modules/bar/popouts/IdleInhibit.qml +++ b/modules/bar/popouts/IdleInhibit.qml @@ -23,7 +23,7 @@ ColumnLayout { Toggle { label.text: qsTr("Inhibit While Playing Audio") checked: Idle.inhibitPipewire - toggle.onToggled: Idle.toggleInhibitPipewire() + toggle.onToggled: Idle.inhibitPipewire = !Idle.inhibitPipewire } component Toggle: RowLayout { diff --git a/modules/ui/UI.qml b/modules/ui/UI.qml index 7eb2f11..cb7ee66 100644 --- a/modules/ui/UI.qml +++ b/modules/ui/UI.qml @@ -30,6 +30,7 @@ Variants { UIState { id: uiState + window: window screen: scope.modelData } diff --git a/modules/ui/UIState.qml b/modules/ui/UIState.qml index 52c8e5e..038b3fc 100644 --- a/modules/ui/UIState.qml +++ b/modules/ui/UIState.qml @@ -8,12 +8,15 @@ import Quickshell.Hyprland Scope { id: root + required property QtObject window required property ShellScreen screen property alias uiState: uiState PersistentProperties { id: uiState - reloadableId: `uiState-${QsWindow.window.screen.name}` + reloadableId: `uiState-${root.screen.name}` + + readonly property QtObject window: root.window // Open panels property bool dashboard diff --git a/services/Idle.qml b/services/Idle.qml index 794e715..c5bc5fc 100644 --- a/services/Idle.qml +++ b/services/Idle.qml @@ -1,47 +1,28 @@ pragma Singleton +import qs.util import QtQuick import Quickshell -import Quickshell.Io +import Quickshell.Wayland +import Quickshell.Services.Pipewire Singleton { id: root - property alias inhibit: inhibitor.running - property bool inhibitPipewire + property bool inhibit: false + property bool inhibitPipewire: true - function toggleInhibitPipewire() { - root.inhibitPipewire = !root.inhibitPipewire; - pipewireInhibitor.running = true; - } - - // Idle Inhibitor - - Process { + IdleInhibitor { id: inhibitor - command: ["wayland-idle-inhibitor"] + enabled: root.inhibit || + (root.inhibitPipewire && + !!Pipewire.nodes.values.find(node => node.isSink && node.isStream)) + window: null } - // Idle Inhibit on Pipewire - - readonly property string pipewireInhibitorService: "wayland-pipewire-idle-inhibit.service" - Timer { - id: pipewireInhibitorTimer running: true repeat: true - triggeredOnStart: true - onTriggered: pipewireInhibitorCheck.running = true - } - - Process { - id: pipewireInhibitorCheck - command: ["systemctl", "status", "--user", root.pipewireInhibitorService] - onExited: (code, _) => root.inhibitPipewire = (code === 0) - } - - Process { - id: pipewireInhibitor - command: ["systemctl", root.inhibitPipewire ? "start" : "stop", "--user", root.pipewireInhibitorService] + onTriggered: inhibitor.window = States.screens.values().next()?.value?.window } }