On Fri, Jul 11, 2008 at 08:42:24AM +0200, markus schnalke wrote:
> Jason Thigpen <[EMAIL PROTECTED]> wrote:
> > 
> > while true
> > do
> > echo `date "+%m/%d %H%M"`
> > sleep 60
> > done | dwm
> > 
> > 
> > (you only need to pole date once a minute for as accurate as you are  
> > getting)
> 
> but then you probably have to wait one minute when you want to
> shutdown (Alt-q) dwm.
> 
> (At least it was like this in earlier releases - I dont know about
> the current ones.)
> 
> 
> meillo

That why you can do something like add:

while true
do
    echo `date "+%m/%d %H%M"` > $HOME/.dwm/dwm_status
    sleep 60
done

to a dwm_run script that writes to a fifo, then in .xinitrc pipe it into
dwm.  No more waiting for the sleep loop to finish to exit dwm.

[ -p $HOME/.dwm/dwm_status ] || mkfifo $HOME/.dwm/dwm_status
sh $HOME/.dwm/dwm_run &
exec dwm < $HOME/.dwm/dwm_status

-- 
James Turner
BSD Group Consulting
http://www.bsdgroup.org

Reply via email to