diff options
Diffstat (limited to 'Scripts/.local/scripts/status/volume')
-rwxr-xr-x | Scripts/.local/scripts/status/volume | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Scripts/.local/scripts/status/volume b/Scripts/.local/scripts/status/volume new file mode 100755 index 0000000..c3de64c --- /dev/null +++ b/Scripts/.local/scripts/status/volume @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +sinks="$(pactl list sinks)" +vol="$(echo "$sinks" | grep '[0-9]\+%' | sed "s,.* \([0-9]\+\)%.*,\1,;1q")" +mpc_vol="$($HOME/.local/scripts/mpc_volume)" + +if [[ $vol -gt 50 ]] +then + icon="" +elif [[ $vol -gt 10 ]] +then + icon="" +else + icon="" +fi + +if [[ $mpc_vol == "n/a" ]] +then + echo "$icon $vol%" +else + echo "$icon $vol% $mpc_vol%" +fi |