From 6ab0fe4623d814c008ca175dad2c01aaf7bbb8b4 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Sat, 9 May 2020 23:50:50 -0500 Subject: [PATCH] Update volume --- .local/bin/statusbar/volume | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.local/bin/statusbar/volume b/.local/bin/statusbar/volume index 229ba432..ca34eee1 100755 --- a/.local/bin/statusbar/volume +++ b/.local/bin/statusbar/volume @@ -1,17 +1,12 @@ #!/bin/sh -# Prints the current volume or 🔇 if muted. Uses PulseAudio by default, -# uncomment the ALSA lines if you remove PulseAudio. +# Prints the current volume or 🔇 if muted. case $BLOCK_BUTTON in - # 1) setsid "$TERMINAL" -e alsamixer & ;; - # 2) amixer sset Master toggle ;; - # 4) amixer sset Master 5%+ >/dev/null 2>/dev/null ;; - # 5) amixer sset Master 5%- >/dev/null 2>/dev/null ;; 1) setsid "$TERMINAL" -e pulsemixer & ;; 2) pamixer -t ;; - 4) pamixer --allow-boost -i 1 ;; - 5) pamixer --allow-boost -d 1 ;; + 4) pamixer --allow-boost -i 10 ;; + 5) pamixer --allow-boost -d 10 ;; 3) notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted. - Middle click to mute. - Scroll to change." ;; @@ -19,13 +14,10 @@ case $BLOCK_BUTTON in esac volstat="$(pactl list sinks)" -# volstat="$(amixer get Master)" # ALSA only equivalent. echo "$volstat" | grep -q "Mute: yes" && printf "🔇\\n" && exit -# echo "$volstat" | grep "\[off\]" >/dev/null && printf "🔇\\n" && exit # ALSA vol="$(echo "$volstat" | grep '[0-9]\+%' | sed "s,.* \([0-9]\+\)%.*,\1,;1q")" -# vol=$(echo "$volstat" | grep -o "\[[0-9]\+%\]" | sed "s/[^0-9]*//g;1q") # ALSA if [ "$vol" -gt "70" ]; then icon="🔊"