diff options
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 | } |
