mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Updated sb-volume to use wireplumber
This update will use wireplumber's wpctl command to show volume levels on statusbar.
This commit is contained in:
parent
86b8a678ee
commit
2da8eba48e
@ -13,17 +13,9 @@ case $BLOCK_BUTTON in
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
#echoing mute doenst work yet need help here
|
||||
[ $(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep 'MUTED') = true ] && echo 🔇 && exit
|
||||
wp="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||
vol="$(echo $wp | awk '{print $2}')"
|
||||
|
||||
vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | cut -d ':' -f 2)"
|
||||
ismuted="$(echo "$wp" | awk '{print $3}')"
|
||||
|
||||
if [ "$vol" -gt "70" ]; then
|
||||
icon="🔊"
|
||||
elif [ "$vol" -lt "30" ]; then
|
||||
icon="🔈"
|
||||
else
|
||||
icon="🔉"
|
||||
fi
|
||||
|
||||
echo "$icon$vol%"
|
||||
[ -n "$ismuted" ] && echo "🔇"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user