Re: [dwm] Done Before: dwm stat scripts!

From: Jeremy O'Brien <>
Date: Tue, 2 Oct 2007 14:14:53 -0400

On Sun, Sep 30, 2007 at 03:42:33AM -0400, T Biehn wrote:
> Anyone have any other things they put in here? Or perhaps better
> script coding practices? (I'm just starting out)

.xinitrc (dwm section):
if [ $wmchoice = "dwm" ]; then
        setdotbackground &
        ~/.xsession &
        yeahconsole &
while true
        while true
# mpc "[`mpc status |head -n 1|sed -e 's/volume.*/stopped/'|tail -c 50`]"
#temp/fan stuff here: [temp:`echo $(cat /sys/devices/temperatures/sensor1_temperature)+ 273|bc`K fan:`cat /sys/devices/temperatures/sensor1_fan_speed |cut -d" " -f 2 |sed 's/(//'`]
echo [``] [`cat /proc/apm |cut -d" " -f 7`:`cat /proc/apm |sed 's/^.*% //; s/-.*/AC/; s/ min/m/'`] [`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq|sed 's/1666666/1.67GHz/; s/833333/833MHz/'`] [v:`echo $(amixer sget Master |grep "Front Left:" |cut -d" " -f6)/1.27|bc`] `tail -n 1 /tmp/cmus-status |tail -c 50` \| `date +'%a %m-%d %H:%M:%S'`
sleep 4
done | /usr/local/bin/dwm

Sorry for the ugly sed stuff. I'm sure there's a better/more efficient
way to do all of the above.

Here's my Xdefaults:

 Jeremy O'Brien aka neutral_insomniac
 GPG key: 0xB1140FDB
 Linux ambelina 2.6.23-rc3 ppc 7447A, altivec supported PowerBook5,8 GNU/Linux

Received on Tue Oct 02 2007 - 20:13:31 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:57:02 UTC