1
0
mirror of https://github.com/artizirk/dotfiles.git synced 2024-11-10 03:30:59 +02:00
dotfiles/.bin/volume_subscribe.sh

11 lines
239 B
Bash
Raw Normal View History

2020-04-16 15:55:35 +03:00
#!/bin/bash
OLD_VOL=0
pactl subscribe | grep --line-buffered "sink" |
while read; do
VOL=$(amixer get Master | grep -Po "[0-9]+(?=%)" | tail -1)
if [[ $VOL != $OLD_VOL ]]; then
2024-06-15 11:26:24 +03:00
swayosd-client --output-volume=+0
2020-04-16 15:55:35 +03:00
OLD_VOL=$VOL
fi
done