mirror of
https://github.com/elenapan/dotfiles.git
synced 2026-01-09 18:52:38 +08:00
updated music and volume scripts
Former-commit-id: 09a9509d37
Former-commit-id: 75caa00883bacbdc94aba01849829e6bbb98a405
Former-commit-id: 4a0e0752bed13307db9a561f70812c70fe1383e5
This commit is contained in:
parent
e626d2ce11
commit
9276efd7f1
2 changed files with 16 additions and 2 deletions
|
|
@ -23,7 +23,6 @@ LIMIT=30
|
|||
#SEPERATOR=" -- "
|
||||
#SEPERATOR=" ~~~ "
|
||||
SEPERATOR=" ~~ "
|
||||
#SEPERATOR=" "
|
||||
#SEPERATOR=" <> "
|
||||
SEPERATOR_LENGTH="$(echo ${#SEPERATOR})"
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue