]> git.phdru.name Git - audio-cdr-video.git/commitdiff
Feat(audio): Get PA volume from different commnads
authorOleg Broytman <phd@phdru.name>
Thu, 4 Dec 2025 21:24:09 +0000 (00:24 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 4 Dec 2025 21:24:09 +0000 (00:24 +0300)
audio/pa-get-volume [new file with mode: 0755]
audio/pa-volume

diff --git a/audio/pa-get-volume b/audio/pa-get-volume
new file mode 100755 (executable)
index 0000000..59540e7
--- /dev/null
@@ -0,0 +1,2 @@
+#! /bin/sh
+pacmd dump | awk '/^set-sink-volume/ {print $3}'
index 2c1e7d0e1d7fa828caef2341e5468d06f61599fb..1b79ada410bd62d06788da1efcb2ea8559964423 100755 (executable)
@@ -24,6 +24,11 @@ then
    pactl set-sink-mute "$default_sink" 0
    exit
 fi
+if [[ $1 == "get" ]]
+then
+   pactl get-sink-volume "$default_sink"
+   exit
+fi
 if [[ $1 == "set" ]]
 then
    NEWVOL="$2"