diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2020-04-14 21:45:09 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2020-04-14 21:45:09 -0400 |
| commit | 54f691a0785072bbe48c7f519ed157a3881a7f06 (patch) | |
| tree | 2723231a9964373e7a8c1640246e626e379fff52 /.local | |
| parent | 314ff058de27274a8b3ee0fd272ed0105fd01b6d (diff) | |
| download | eibhear-54f691a0785072bbe48c7f519ed157a3881a7f06.tar.gz eibhear-54f691a0785072bbe48c7f519ed157a3881a7f06.tar.zst eibhear-54f691a0785072bbe48c7f519ed157a3881a7f06.zip | |
language-independent volume script
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/bin/statusbar/volume | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/statusbar/volume b/.local/bin/statusbar/volume index 20805e6..7580f20 100755 --- a/.local/bin/statusbar/volume +++ b/.local/bin/statusbar/volume @@ -23,7 +23,7 @@ volstat="$(pactl list sinks)" echo "$volstat" | grep -q "Mute: yes" && printf "🔇\\n" && exit # echo "$volstat" | grep "\[off\]" >/dev/null && printf "🔇\\n" && exit # ALSA -vol="$(echo "$volstat" | grep '^[[:space:]]Volume:' | sed "s,.* \([0-9]\+\)%.*,\1,;1q")" +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 |
