That looks very cool...i'm gonna have to try it.
Thanks =o)

>From Jukka Salmi, (18/10/06 23:25):
>  I'm using a script writing status bar information to a fifo from
>  which dwm reads. This seems to work well for both startx and xdm X
>  initialisation and doesn't suffer from the problems you describe.
>  
>  The script (~/.dwm/in.sh) basically contains:
>  
>       #!/bin/sh -e
>       
>       [ $# -eq 1 ]; FIFO="$1"
>       [ -e "$FIFO" ] || mkfifo "$FIFO"
>       [ -p "$FIFO" ]
>       exec >"$FIFO" 2>&1
>  
>       while :; do
>               # XXX write dwm status bar information
>               sleep 10
>       done
>       exit 1 # NOTREACHED
>  
>  It creates the fifo if it doesn't exist, redirects stdout and stderr
>  to it and loops forever, writing status bar information.
>  
>  My ~/.xinitrc (or ~/.xsession, if using xdm) contains:
>  
>       WM=dwm
>       fifo=~/.dwm/in
>       
>       ~/.dwm/in.sh $fifo &
>       while [ ! -p $fifo ]; do sleep .1; done
>       exec <$fifo
>       
>       $WM &
>       wmpid=$!
>       wait $wmpid
>  
>  This starts the status bar information writing script in the background
>  and waits until the fifo is created. It then redirects stdin from the
>  fifo (for dwm), starts dwm and waits for it. Thus exiting (or killing)
>  dwm causes X to shut down.
>  
>  
>  HTH, Jukka
>  
>  -- 
>  bashian roulette:
>  $ ((RANDOM%6)) || rm -rf ~
>  
>  

Reply via email to