move poll to its own function to prep for track_anything.sh
This commit is contained in:
parent
1fccc404ef
commit
70cbf56a3a
|
@ -1,7 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
poll() {
|
||||||
|
pamixer --get-volume | grep -E '^[0-9]+$'
|
||||||
|
}
|
||||||
|
|
||||||
pactl subscribe | while read -r ;do
|
pactl subscribe | while read -r ;do
|
||||||
case "$REPLY" in
|
case "$REPLY" in
|
||||||
*change*) pamixer --get-volume | grep -E '^[0-9]+$';;
|
*change*) poll ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue
Block a user