From b81b90ed7bc5c3547815c2a1558fd4820ab67552 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Wed, 8 Oct 2025 00:00:12 -0400 Subject: [PATCH 1/6] fix: manually implement repeating keybinds Apparently Hyprland's repeating keybinds don't work properly with DBus shortcuts, so we have to implement this logic ourselves. --- services/Audio.qml | 39 +++++++++++++++++++++++++++++++++++++-- services/Brightness.qml | 40 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 75 insertions(+), 4 deletions(-) diff --git a/services/Audio.qml b/services/Audio.qml index 2c38010..75fd528 100644 --- a/services/Audio.qml +++ b/services/Audio.qml @@ -2,6 +2,7 @@ pragma Singleton import qs.config import qs.custom +import QtQuick import Quickshell import Quickshell.Services.Pipewire @@ -37,15 +38,49 @@ Singleton { } CustomShortcut { + id: volumeUp name: "volumeUp" description: "Increase volume" - onPressed: root.increaseVolume() + onPressed: { + root.increaseVolume(); + volumeUpTimer.interval = 800; + volumeUpTimer.running = true; + } + onReleased: { + volumeUpTimer.running = false; + } + } + Timer { + id: volumeUpTimer + interval: 800 + repeat: true + onTriggered: { + interval = 200; + root.increaseVolume(); + } } CustomShortcut { + id: volumeDown name: "volumeDown" description: "Decrease volume" - onPressed: root.decreaseVolume() + onPressed: { + root.decreaseVolume(); + volumeDownTimer.interval = 800; + volumeDownTimer.running = true; + } + onReleased: { + volumeDownTimer.running = false; + } + } + Timer { + id: volumeDownTimer + interval: 800 + repeat: true + onTriggered: { + interval = 200; + root.decreaseVolume(); + } } CustomShortcut { diff --git a/services/Brightness.qml b/services/Brightness.qml index b369d2f..34403d0 100644 --- a/services/Brightness.qml +++ b/services/Brightness.qml @@ -1,6 +1,7 @@ pragma Singleton pragma ComponentBehavior: Bound +import qs.config import qs.custom import Quickshell import Quickshell.Io @@ -67,15 +68,50 @@ Singleton { } CustomShortcut { + id: brightnessUp name: "brightnessUp" description: "Increase brightness" - onPressed: root.increaseBrightness() + onPressed: { + console.log("a") + root.increaseBrightness(); + brightnessUpTimer.interval = 800; + brightnessUpTimer.running = true; + } + onReleased: { + brightnessUpTimer.running = false; + } + } + Timer { + id: brightnessUpTimer + interval: 800 + repeat: true + onTriggered: { + interval = 200; + root.increaseBrightness(); + } } CustomShortcut { + id: brightnessDown name: "brightnessDown" description: "Decrease brightness" - onPressed: root.decreaseBrightness() + onPressed: { + root.decreaseBrightness(); + brightnessDownTimer.interval = 800; + brightnessDownTimer.running = true; + } + onReleased: { + brightnessDownTimer.running = false; + } + } + Timer { + id: brightnessDownTimer + interval: 800 + repeat: true + onTriggered: { + interval = 200; + root.decreaseBrightness(); + } } component Monitor: QtObject { From 7c90710bf66973c2a5e7bece0621da4eb6d682b2 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Wed, 8 Oct 2025 00:02:14 -0400 Subject: [PATCH 2/6] fix: make `clearNotifs` and `dismissNotifs` do different things --- services/Notifs.qml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/services/Notifs.qml b/services/Notifs.qml index 52a20ca..decc95e 100644 --- a/services/Notifs.qml +++ b/services/Notifs.qml @@ -54,16 +54,7 @@ Singleton { description: "Dismiss all notifications" onPressed: { for (const notif of root.list) - notif.popup = null; - } - } - - IpcHandler { - target: "notifs" - - function clear(): void { - for (const notif of root.list) - notif.popup = null; + notif.notification.dismiss(); } } From b27fb0b079211b91b422af453d1c6896d8640027 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Wed, 8 Oct 2025 00:03:02 -0400 Subject: [PATCH 3/6] fix: correct typo in command code --- modules/Commands.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Commands.qml b/modules/Commands.qml index 6d2f02a..1a41fdd 100644 --- a/modules/Commands.qml +++ b/modules/Commands.qml @@ -109,7 +109,7 @@ Scope { description: "Toggle launcher" onPressed: { const uiState = States.getForActive(); - uiState.laucher = !uiState.launcher; + uiState.launcher = !uiState.launcher; } } From 589af00394e4e94b8d0e3058ed9628e442c3339b Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Wed, 8 Oct 2025 00:03:18 -0400 Subject: [PATCH 4/6] fix: make GPU type config optional --- services/SystemUsage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/SystemUsage.qml b/services/SystemUsage.qml index bd02da3..18e5333 100644 --- a/services/SystemUsage.qml +++ b/services/SystemUsage.qml @@ -10,7 +10,7 @@ Singleton { property real cpuPerc property real cpuTemp - readonly property string gpuType: Config.services.gpuType.toUpperCase() || autoGpuType + readonly property string gpuType: Config.services.gpuType?.toUpperCase() || autoGpuType property string autoGpuType: "NONE" property real gpuPerc property real gpuTemp From dad57da9058f01b8e77f33ab866f26f3137a1283 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Wed, 8 Oct 2025 00:04:14 -0400 Subject: [PATCH 5/6] fix: do nothing if moving to existing workspace --- modules/Commands.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/Commands.qml b/modules/Commands.qml index 1a41fdd..f2210cf 100644 --- a/modules/Commands.qml +++ b/modules/Commands.qml @@ -58,6 +58,7 @@ Scope { } else { id = uiState.workspaces.get(index).workspace.id; } + if (id === Hypr.focusedWorkspace.id) return; Hypr.dispatch(`workspace ${id}`); } @@ -80,6 +81,7 @@ Scope { } else { id = uiState.workspaces.get(index).workspace.id; } + if (id === Hypr.focusedWorkspace.id) return; Hypr.dispatch(`hy3:movetoworkspace ${id}`); } From 484e0ce17f9656a963105dda68c05ec62d3b294f Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Wed, 8 Oct 2025 00:16:02 -0400 Subject: [PATCH 6/6] fix: handle edge case in workspace movement commands --- modules/Commands.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/Commands.qml b/modules/Commands.qml index f2210cf..cdf3aee 100644 --- a/modules/Commands.qml +++ b/modules/Commands.qml @@ -54,6 +54,8 @@ Scope { if (index > uiState.workspaces.count) return; let id; if (index === uiState.workspaces.count) { + if (uiState.workspaces.get(index - 1).workspace === Hypr.focusedWorkspace + && Hypr.focusedWorkspace.toplevels.values.length === 0) return; id = root.nextWorkspace(); } else { id = uiState.workspaces.get(index).workspace.id; @@ -77,6 +79,8 @@ Scope { if (index > uiState.workspaces.count) return; let id; if (index === uiState.workspaces.count) { + if (uiState.workspaces.get(index - 1).workspace === Hypr.focusedWorkspace + && Hypr.focusedWorkspace.toplevels.values.length === 0) return; id = nextWorkspace(); } else { id = uiState.workspaces.get(index).workspace.id;