Re: [dev] wmii how to replace status bar with dzen2

From: Thomas Dahms <>
Date: Mon, 07 Feb 2011 17:53:41 +0100

> For now I'm not bothered with colors etc. I just need a working example
> of how to automatically put some data (refreshed every second) into my
> /rbar/cpu. Any ideas please?

Just create a similar function and Action:

cpu() {
   echo -n 'CPU:' $(sysctl -n dev.cpu.0.freq) 'MHz'

Action cpu
   set +xv
   if wmiir remove /rbar/cpu 2>/dev/null; then
     sleep 2
   echo "$WMII_NORMCOLORS" | wmiir create /rbar/cpu
   while cpu | wmiir write /rbar/cpu; do
     sleep 1

And then at the bottom of your wmiirc locate "action status &" and insert
behind that:

action cpu &

One more thing: Remember that wmiirc sources wmiirc_local. You should be
able to put all your customizations into an wmiirc_local without having
the need to modifiy wmiirc. Which is handy since the upstream wmiirc may
change at times. Unfortunately, I don't really know at the moment how to
use wi_events or local_events correctly inside wmiirc_local.

Thomas Dahms
Received on Mon Feb 07 2011 - 17:53:41 CET

This archive was generated by hypermail 2.2.0 : Mon Feb 07 2011 - 18:00:05 CET