Hi,
I use a counter in the loop, so I have to wait just a second, after dwm
exits..
#!/bin/bash
#.xinitrc
..
DWM_PID=$$
DWM_SLEEP=0
while [ -n "${DWM_PID}" ]; do
if [ ${DWM_SLEEP} -le 0 ]; then
source ${HOME}/.dwm/status.conf
echo ${DWM_OUTPUT}
fi
DWM_SLEEP=$((${DWM_SLEEP}-1))
sleep 1
DWM_PID="$(pidof dwm)"
done | isbf -f ${HOME}/.dwm/in | dwm >> ${HOME}/.dwm/out 2>&1
#!/bin/bash
#.dwm/status.conf
DWM_SLEEP=60
DWM_OUTPUT="$(date +'%m%dT%H%M') $(uptime | sed 's/.*://; s/,//g')"
Regards Matthias
-- Matthias Diener # +49 171-5352704 # ICQ: 29548146 # MSN: msn_AT_macarony.de http://macarony.de/md.asc A58D CB56 DFCE BD8C 8D1C 0FA7 B219 ED19 C3BF 6E05 On Wed, Oct 18, 2006 at 07:36:38PM +0200, Antoni Grzymala wrote: > Tako rzecze David Tweed (w li??cie z 2006-10-18, 17:29): > > > #!/bin/sh > > #-*-.sh-*- > > > > while true > > do > > cat "/home/sis05dst/.labels" > > sleep 60 > > done | /home/sis05dst/BIN/dwm > > It will eventually exit, you just have to wait for the sleep 60 to time > out. You may want to use a smaller value, to not have to wait long. > > [a] > > -- > . Antoni Grzymala - antoni (at) chopin.edu.pl -------------------. > | OpenPGP KeyID EB315583 available now from a keyserver near you | > | Fingerprint A819 6D2E D5EB D9E0 D2D9 7AF6 2FAF 4A11 EB31 5583 | > `----------------------------------------------------------------'Received on Sun Oct 22 2006 - 18:33:37 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:32:09 UTC