updated music and volume scripts

Former-commit-id: 09a9509d37
Former-commit-id: 75caa00883bacbdc94aba01849829e6bbb98a405
Former-commit-id: 4a0e0752bed13307db9a561f70812c70fe1383e5
This commit is contained in:
elena 2017-09-25 03:09:11 +03:00
parent e626d2ce11
commit 9276efd7f1
2 changed files with 16 additions and 2 deletions

View file

@ -23,7 +23,6 @@ LIMIT=30
#SEPERATOR=" -- "
#SEPERATOR=" ~~~ "
SEPERATOR=" ~~ "
#SEPERATOR="  "
#SEPERATOR=" <> "
SEPERATOR_LENGTH="$(echo ${#SEPERATOR})"

View file

@ -1 +1,16 @@
amixer get Master | grep "${snd_cha}" | awk -F'[]%[]' '/%/ {if ($7 == "off") {print " \n"} else {printf " %d%%\n", $2}}'
#!/bin/bash
# For Alsa
#amixer get Master | grep "${snd_cha}" | awk -F'[]%[]' '/%/ {if ($7 == "off") {print "  "} else {printf "%d%% ", $2}}'
#
# For pulse
VOL="$(pactl list sinks | grep "Volume: " | awk '{print $5}' | head -1)"
MUTE="$(pactl list sinks | grep -i "mute" | head -1 | awk '{print $2}')"
if [[ "$MUTE" != "no" ]]; then
echo "  "
else
echo "$VOL "
fi