Update scripts. Added Pulse volume level

This commit is contained in:
Linux User 2022-08-18 21:21:42 +00:00
parent 219ddac852
commit 2547920d81
9 changed files with 21 additions and 0 deletions

21
.local/scripts/0180_pulse Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
COLOR1="#FF0000"
COLOR2="#700000"
SND=$( pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' )
if [ $SND -ge 67 ]
then
glyph=""
elif [ $SND -ge 34 ]
then
glyph=""
elif [ $SND -ge 1 ]
then
glyph=""
else
glyph=""
fi
echo "^b$COLOR1^^c$COLOR2^ $glyph ^c$COLOR1^^b$COLOR2^ $SND% ^d^"