Compare commits

...

6 commits

Author SHA1 Message Date
484e0ce17f
fix: handle edge case in workspace movement commands 2025-10-08 00:16:02 -04:00
dad57da905
fix: do nothing if moving to existing workspace 2025-10-08 00:04:14 -04:00
589af00394
fix: make GPU type config optional 2025-10-08 00:03:18 -04:00
b27fb0b079
fix: correct typo in command code 2025-10-08 00:03:02 -04:00
7c90710bf6
fix: make clearNotifs and dismissNotifs do different things 2025-10-08 00:02:14 -04:00
b81b90ed7b
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.
2025-10-08 00:00:12 -04:00
5 changed files with 84 additions and 16 deletions

View file

@ -54,10 +54,13 @@ 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}`);
}
@ -76,10 +79,13 @@ 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}`);
}
@ -109,7 +115,7 @@ Scope {
description: "Toggle launcher"
onPressed: {
const uiState = States.getForActive();
uiState.laucher = !uiState.launcher;
uiState.launcher = !uiState.launcher;
}
}

View file

@ -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 {

View file

@ -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 {

View file

@ -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();
}
}

View file

@ -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