Go back to using PulseAudio for volume control
This commit is contained in:
parent
e8520cd29c
commit
2609aa57ae
3 changed files with 8 additions and 8 deletions
|
|
@ -3,13 +3,12 @@
|
|||
today=$(date +'%Y-%m-%d')
|
||||
now=$(date +'%H:%M:%S')
|
||||
|
||||
audio_state=$(amixer get Master | tail -n 1)
|
||||
audio_volume=$(echo "$audio_state" | grep -o '[0-9]*%' | tr -d %)
|
||||
audio_mute=$(echo "$audio_state" | grep -o '\[o.*\]' | tr -d \[\])
|
||||
audio_mute=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')
|
||||
audio_volume=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -o '[0-9]\+%' | head -n 1 | tr -d %)
|
||||
audio_symbol="❔"
|
||||
if [ "${audio_mute}" = "off" ]; then
|
||||
if [ "${audio_mute}" = "yes" ]; then
|
||||
audio_symbol="🔇"
|
||||
elif [ "${audio_mute}" = "on" ]; then
|
||||
elif [ "${audio_mute}" = "no" ]; then
|
||||
if [ "${audio_volume}" = "0" ]; then
|
||||
audio_symbol="🔈"
|
||||
elif [ "${audio_volume}" -lt 50 ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue