Re: Using dzen, ratpoison, freebsd

Eric S Fraga <e.fraga-hclig2XLE9Zaa/[email protected]>
Newsgroups gmane.comp.window-managers.ratpoison.devel
Message-ID <[email protected]>
Dirk Arlt <[email protected]> writes:
> I'd like add a Mailchecker (which i found but did not get it to
> work), diskspace, network-usage, calendar, window-list and such...
>
> What i wanted to ask: Does anybody use the combination freebsd,
> ratpoison, dzen and what scripts are you using.

I use linux + ratpoison + dzen.  In my dzen script, I have define the
following function (very much specific to my needs but you may be able
to customise it according to yours) which gets the sizes of a set of
mbox style mail files:

,----
| # get numbers of messages in various mailboxes (inbox, spool and drafts)
| function mbox () {
|     res=""
|     colour=$RED
|     for m in vmdrafts vminbox.spool vminbox 
|     do
| 	f="$HOME/s/Mail/$m"
| 	if [ -f $f ];
| 	then
| 	    r=$(from -c -f $HOME/s/Mail/$m | awk '{print $3}')
| 	else
| 	    r="0"
| 	fi
| 	res="$res $colour$r"
| 	colour=$GREEN
|     done
|     echo $res
| }
`----

I then have the following in my loop within the dzen script:

,----
| MAILINFO=$(mbox)
| MAILLINE=$(echo "M: $GREEN$MAILINFO$RED |$CLEAN")
| echo "$MAILLINE $POWERLINE $TEMPERATURELINE | Load: $LOADLINE | $VOLUMELINE | $DATELINE"
| 
| sleep 10
`----

HTH,
eric
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.