3 This script is the event generator for the bar. The ideas is that
4 it sits waiting for stuff to happen (window focus, date change,
11 Kill the player monitor and the date subshell upon exit
21 The idea behind `uniq_linebuffered' is to avoid refreshing the bar
22 every tick if the state doesn't change. It doesn't work for some
25 # XXX: for some reasons this don't work
26 fn uniq_linebuffered {
27 awk '$0 != l { print ; l=$0 ; fflush(); }'
30 Simulate the tag and play event at the start to force the process
31 to update the tags and music info.
39 date=`{date +'%H:%M, %Y-%m-%d'}
40 printf 'date\t%s\n' $"date
42 } | uniq_linebuffered &
45 Music player event generator:
47 amused monitor play,next,prev,jump &
50 Window manager event generator:
54 Kill everything upon exit