diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2025-09-10 15:57:26 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2025-09-10 15:57:26 +0200 |
| commit | d20393e077b8d97b18f4a224ddcb20caf6dac23b (patch) | |
| tree | 337a8630deecdb50a2c879754e6b34b71575bbe0 /accounts/gkleen@sif/shell/quickshell/UnixIPC.qml | |
| parent | 9fab3828698199718a3d2f2faf8826f77d9258f7 (diff) | |
| download | nixos-d20393e077b8d97b18f4a224ddcb20caf6dac23b.tar nixos-d20393e077b8d97b18f4a224ddcb20caf6dac23b.tar.gz nixos-d20393e077b8d97b18f4a224ddcb20caf6dac23b.tar.bz2 nixos-d20393e077b8d97b18f4a224ddcb20caf6dac23b.tar.xz nixos-d20393e077b8d97b18f4a224ddcb20caf6dac23b.zip | |
...
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/UnixIPC.qml')
| -rw-r--r-- | accounts/gkleen@sif/shell/quickshell/UnixIPC.qml | 10 |
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 @@ | |||
| 1 | import Quickshell | 1 | import Quickshell |
| 2 | import Quickshell.Io | 2 | import Quickshell.Io |
| 3 | import Quickshell.Services.Pipewire | 3 | import Quickshell.Services.Pipewire |
| 4 | import qs.Services | ||
| 4 | 5 | ||
| 5 | Scope { | 6 | Scope { |
| 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 | } |
