diff --git a/ddwatch.sh b/ddwatch.sh new file mode 100755 index 0000000..9e438e6 --- /dev/null +++ b/ddwatch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +set -eu +file="$1" +str='Current' +interval=5 +ding="/usr/share/bzflag/pop.wav" + +last="$(grep "$str" "$file")" +while sleep $interval +do + cur="$(grep "$str" "$file")" + test "$cur" != "$last" && mpv "$ding" + last="$cur" +done