move poll to its own function to prep for track_anything.sh

This commit is contained in:
James Andariese 2024-03-30 12:04:53 -05:00
parent 1fccc404ef
commit 70cbf56a3a

View File

@ -1,7 +1,11 @@
#!/bin/sh
poll() {
pamixer --get-volume | grep -E '^[0-9]+$'
}
pactl subscribe | while read -r ;do
case "$REPLY" in
*change*) pamixer --get-volume | grep -E '^[0-9]+$';;
*change*) poll ;;
esac
done