nvpie 2da8eba48e
Updated sb-volume to use wireplumber
This update will use wireplumber's wpctl command to show volume levels on statusbar.
2022-08-16 15:58:26 +00:00

22 lines
598 B
Bash
Executable File

#!/bin/sh
# Prints the current volume or 🔇 if muted.
case $BLOCK_BUTTON in
1) setsid -f "$TERMINAL" -e pulsemixer ;;
2) wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle ;;
4) wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ ;;
5) wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- ;;
3) notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted.
- Middle click to mute.
- Scroll to change." ;;
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
wp="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
vol="$(echo $wp | awk '{print $2}')"
ismuted="$(echo "$wp" | awk '{print $3}')"
[ -n "$ismuted" ] && echo "🔇"