summaryrefslogtreecommitdiff
path: root/.config/quickshell/Services/Volume.qml
diff options
context:
space:
mode:
authorSam Nystrom <sam@samnystrom.dev>2026-01-15 16:53:43 -0500
committerSam Nystrom <sam@samnystrom.dev>2026-01-15 16:53:43 -0500
commit53008538e5bef961e9ceb5abc5c5ee05a559e97d (patch)
tree3ad2f4fa7fbc88ff4bb67c75395cc4acdb9c09fb /.config/quickshell/Services/Volume.qml
parent3ac17574dbcfe68b2fba11aeeb445f04d1170c2a (diff)
update qs config
Diffstat (limited to '.config/quickshell/Services/Volume.qml')
-rw-r--r--.config/quickshell/Services/Volume.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/.config/quickshell/Services/Volume.qml b/.config/quickshell/Services/Volume.qml
new file mode 100644
index 0000000..875f1c9
--- /dev/null
+++ b/.config/quickshell/Services/Volume.qml
@@ -0,0 +1,22 @@
+pragma Singleton
+
+import QtQuick
+import Quickshell
+import Quickshell.Services.Pipewire
+
+Singleton {
+ id: root
+ property int volume
+
+ PwObjectTracker {
+ objects: [ Pipewire.defaultAudioSink ]
+ }
+
+ Connections {
+ target: Pipewire.defaultAudioSink?.audio
+
+ function onVolumeChanged() {
+ root.volume = Math.round(Pipewire.defaultAudioSink?.audio.volume * 100)
+ }
+ }
+}