Update scripts. Added Pulse volume level
This commit is contained in:
21
.local/scripts/0180_pulse
Executable file
21
.local/scripts/0180_pulse
Executable 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^"
|
Reference in New Issue
Block a user