]> git.phdru.name Git - audio-cdr-video.git/commitdiff
Feat(pa-get-volume): Convert to percents master
authorOleg Broytman <phd@phdru.name>
Thu, 4 Dec 2025 21:36:38 +0000 (00:36 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 4 Dec 2025 21:36:38 +0000 (00:36 +0300)
audio/pa-get-volume

index 59540e7a8959a3cdf6154d1cd0adf32c35cbc1e3..ebfce6895e4ba5987c06617733ffe9a911e596bb 100755 (executable)
@@ -1,2 +1,4 @@
 #! /bin/sh
-pacmd dump | awk '/^set-sink-volume/ {print $3}'
+
+hex_volume=`pacmd dump | awk '/^set-sink-volume/ {print $3}'`
+python3 -c "print(int($hex_volume * 100 / 65535))"