#!/bin/rc # place weather, date and time in dwm status bar. # for laptops, add apm data to status bar. # # pipe through dwm to terminate when dwm exits: # # $HOME/bin/status | /usr/local/bin/dwm >[2]$HOME/dwm.log # laptops=(fk* tr*) while(){ weather=`{cat $HOME/tmp/weather} date=`{date | awk '{print $1 " " $2 " " $3 " " substr($4, 0, 5)}'} if(~ `{hostname -s} $laptops){ apm = `{/usr/sbin/apm -l -v} xsetroot -name $"apm^' | '^$"weather^' | '^$"date } if not xsetroot -name $"weather^' | '^$"date sleep 30 }