diff --git a/modules/Commands.qml b/modules/Commands.qml index cdf3aee..6d2f02a 100644 --- a/modules/Commands.qml +++ b/modules/Commands.qml @@ -54,13 +54,10 @@ 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; } - if (id === Hypr.focusedWorkspace.id) return; Hypr.dispatch(`workspace ${id}`); } @@ -79,13 +76,10 @@ 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; } - if (id === Hypr.focusedWorkspace.id) return; Hypr.dispatch(`hy3:movetoworkspace ${id}`); } @@ -115,7 +109,7 @@ Scope { description: "Toggle launcher" onPressed: { const uiState = States.getForActive(); - uiState.launcher = !uiState.launcher; + uiState.laucher = !uiState.launcher; } } diff --git a/services/Audio.qml b/services/Audio.qml index 75fd528..2c38010 100644 --- a/services/Audio.qml +++ b/services/Audio.qml @@ -2,7 +2,6 @@ pragma Singleton import qs.config import qs.custom -import QtQuick import Quickshell import Quickshell.Services.Pipewire @@ -38,49 +37,15 @@ Singleton { } CustomShortcut { - id: volumeUp name: "volumeUp" description: "Increase volume" - 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(); - } + onPressed: root.increaseVolume() } CustomShortcut { - id: volumeDown name: "volumeDown" description: "Decrease volume" - 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(); - } + onPressed: root.decreaseVolume() } CustomShortcut { diff --git a/services/Brightness.qml b/services/Brightness.qml index 34403d0..b369d2f 100644 --- a/services/Brightness.qml +++ b/services/Brightness.qml @@ -1,7 +1,6 @@ pragma Singleton pragma ComponentBehavior: Bound -import qs.config import qs.custom import Quickshell import Quickshell.Io @@ -68,50 +67,15 @@ Singleton { } CustomShortcut { - id: brightnessUp name: "brightnessUp" description: "Increase brightness" - 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(); - } + onPressed: root.increaseBrightness() } CustomShortcut { - id: brightnessDown name: "brightnessDown" description: "Decrease brightness" - 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(); - } + onPressed: root.decreaseBrightness() } component Monitor: QtObject { diff --git a/services/Notifs.qml b/services/Notifs.qml index decc95e..52a20ca 100644 --- a/services/Notifs.qml +++ b/services/Notifs.qml @@ -54,7 +54,16 @@ Singleton { description: "Dismiss all notifications" onPressed: { for (const notif of root.list) - notif.notification.dismiss(); + notif.popup = null; + } + } + + IpcHandler { + target: "notifs" + + function clear(): void { + for (const notif of root.list) + notif.popup = null; } } diff --git a/services/SystemUsage.qml b/services/SystemUsage.qml index 18e5333..bd02da3 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