mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 12:44:35 +00:00
Call get_report before while loop in loop()
This commit is contained in:
parent
d8430aa089
commit
f76f7c65da
|
@ -64,16 +64,14 @@ get_report() {
|
|||
|
||||
# Continually run and report every volume change (into stdout)
|
||||
loop() {
|
||||
get_report
|
||||
pactl subscribe | grep --line-buffered "change" | while read -r _; do
|
||||
get_report
|
||||
done
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
"loop")
|
||||
get_report
|
||||
loop
|
||||
;;
|
||||
"loop") loop ;;
|
||||
|
||||
"once") get_report ;;
|
||||
|
||||
|
@ -107,8 +105,5 @@ case "$1" in
|
|||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
>&2 echo "Invalid usage, argument '$1' not recognized."
|
||||
exit 1
|
||||
;;
|
||||
*) >&2 echo "Invalid usage, argument '$1' not recognized."; exit 1 ;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue