From: Oleg Broytman Date: Thu, 4 Dec 2025 21:36:38 +0000 (+0300) Subject: Feat(pa-get-volume): Convert to percents X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;ds=sidebyside;p=audio-cdr-video.git Feat(pa-get-volume): Convert to percents --- diff --git a/audio/pa-get-volume b/audio/pa-get-volume index 59540e7..ebfce68 100755 --- a/audio/pa-get-volume +++ b/audio/pa-get-volume @@ -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))"