From d20393e077b8d97b18f4a224ddcb20caf6dac23b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 10 Sep 2025 15:57:26 +0200 Subject: ... --- accounts/gkleen@sif/shell/quickshell/UnixIPC.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'accounts/gkleen@sif/shell/quickshell/UnixIPC.qml') diff --git a/accounts/gkleen@sif/shell/quickshell/UnixIPC.qml b/accounts/gkleen@sif/shell/quickshell/UnixIPC.qml index 7b308ec0..742ef4f5 100644 --- a/accounts/gkleen@sif/shell/quickshell/UnixIPC.qml +++ b/accounts/gkleen@sif/shell/quickshell/UnixIPC.qml @@ -1,6 +1,7 @@ import Quickshell import Quickshell.Io import Quickshell.Services.Pipewire +import qs.Services Scope { id: root @@ -16,6 +17,8 @@ Scope { if (command.Volume) root.onCommandVolume(command.Volume); + else if (command.Brightness) + root.onCommandBrightness(command.Brightness); else console.warn("UnixIPC: Command not handled:", JSON.stringify(command)); } catch (e) { @@ -46,4 +49,11 @@ Scope { if (command["mic-muted"] === "toggle") Pipewire.defaultAudioSource.audio.muted = !Pipewire.defaultAudioSource.audio.muted; } + + function onCommandBrightness(command) { + if (command === "up") + Brightness.currBrightness += 0.02 + if (command === "down") + Brightness.currBrightness -= 0.02 + } } -- cgit v1.2.3