1
0
mirror of https://github.com/artizirk/dotfiles.git synced 2026-05-20 18:05:02 +03:00
Files
dotfiles/.bin/volume_subscribe.sh
T
2024-06-15 11:26:24 +03:00

11 lines
239 B
Bash
Executable File

#!/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
swayosd-client --output-volume=+0
OLD_VOL=$VOL
fi
done