summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/shell/quickshell/UnixIPC.qml
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/UnixIPC.qml')
-rw-r--r--accounts/gkleen@sif/shell/quickshell/UnixIPC.qml10
1 files changed, 10 insertions, 0 deletions
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 @@
1import Quickshell 1import Quickshell
2import Quickshell.Io 2import Quickshell.Io
3import Quickshell.Services.Pipewire 3import Quickshell.Services.Pipewire
4import qs.Services
4 5
5Scope { 6Scope {
6 id: root 7 id: root
@@ -16,6 +17,8 @@ Scope {
16 17
17 if (command.Volume) 18 if (command.Volume)
18 root.onCommandVolume(command.Volume); 19 root.onCommandVolume(command.Volume);
20 else if (command.Brightness)
21 root.onCommandBrightness(command.Brightness);
19 else 22 else
20 console.warn("UnixIPC: Command not handled:", JSON.stringify(command)); 23 console.warn("UnixIPC: Command not handled:", JSON.stringify(command));
21 } catch (e) { 24 } catch (e) {
@@ -46,4 +49,11 @@ Scope {
46 if (command["mic-muted"] === "toggle") 49 if (command["mic-muted"] === "toggle")
47 Pipewire.defaultAudioSource.audio.muted = !Pipewire.defaultAudioSource.audio.muted; 50 Pipewire.defaultAudioSource.audio.muted = !Pipewire.defaultAudioSource.audio.muted;
48 } 51 }
52
53 function onCommandBrightness(command) {
54 if (command === "up")
55 Brightness.currBrightness += 0.02
56 if (command === "down")
57 Brightness.currBrightness -= 0.02
58 }
49} 59}