You made it more complex, I made it more simple now:
---snip from README---
splaying status info
----------------------
In order to display status info in the bar, you can do following
in .xinitrc:
while true
do
echo `date` `uptime | sed 's/.*://; s/,//g'`
sleep 2
done | dwm
--- Regards, Anselm PS: However the problem is still there, that you need to wait 2 seconds until X server shuts down (but I rarely restart X and now we don't waste yet another process idling around)... On Fri, Jul 21, 2006 at 11:17:54AM +0200, Jukka Salmi wrote: > Hi, > > just a hint: if you follow the example from the README to display some > info in the bar, you'll have to wait for up to 5 seconds - i.e. for > as long as your script sleep(1)s - after quitting dwm until the X > server shuts down. And if your script traps SIGPIPE you'll wait forever > ;-) > > To avoid this delay, I'm using the following script: > > #!/bin/sh -e > > [ $# -eq 1 ]; FIFO="$1" > [ -e "$FIFO" ] || mkfifo "$FIFO" > [ -p "$FIFO" ] > exec >"$FIFO" 2>&1 > > while :; do > printf '%s | %s\n' \ > "$(uptime | sed 's/^.*load averages: /load avg: /')" \ > "$(date '+%a, %b %d, %H:%M')" > sleep 10 > done > > exit 1 # NOTREACHED > > > I start dwm from ~/.xinitrc (~/.dwm/in.sh is the script above): > > fifo=~/.dwm/in > ~/.dwm/in.sh $fifo & > exec <$fifo > dwm & > wmpid=$! > [...] > wait $wmpid > > > Cheers, Jukka > > -- > bashian roulette: > $ ((RANDOM%6)) || rm -rf ~ > > _______________________________________________ > dwm mailing list > dwm_AT_10kloc.org > http://wmii.de/cgi-bin/mailman/listinfo/dwm -- Anselm R. Garbe ><>< www.ebrag.de ><>< GPG key: 0D73F361Received on Fri Jul 21 2006 - 11:58:37 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:29:48 UTC