statusbar/volume: switch to wpctl
This commit is contained in:
parent
2b2c503b71
commit
d8bb7fe2a9
1 changed files with 4 additions and 11 deletions
|
@ -1,15 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) pamixer -t ;;
|
||||
3) setsid -f "$TERMINAL" -e pulsemixer ;;
|
||||
4) pamixer --allow-boost -i 1 ;;
|
||||
5) pamixer --allow-boost -d 1 ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
esac
|
||||
|
||||
[ $(pamixer --get-mute) = true ] && echo Muted && exit
|
||||
|
||||
vol="$(pamixer --get-volume)"
|
||||
wp="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||
vol="$(echo $wp | awk '{print $2 * 100}')"
|
||||
ismuted="$(echo "$wp" | awk '{print $3}')"
|
||||
|
||||
[ -n "$ismuted" ] && echo Muted && exit
|
||||
printf "%s%%" "$vol"
|
||||
|
|
Loading…
Reference in a new issue