This is a little bit of Perl::Gtk that I knocked together after building a few monitoring toys for FVWM from the same basic codebase. It was originally a Perl::Tk toy, but Perl::Tk is wildly abusive in terms of memory and in theory using Gtk possibly means I pick up any theming crap people are playing with - although I've not tested the latter. It's designed to be used with FVWMButtons' Swallow command, for example like this:

*FvwmButtons(2x1, Swallow(UseOld, NoKill) "APM"\ `Exec perl -I$HOME/src/perl -MMonitor::APM -MGtk -e 'init Gtk; my $mon = new Monitor::IrDA; $mon->init(); $mon->start(); Gtk->main;'`)

The base class, Monitor, implements the window creation & timer stuff. The subclasses have to override the newdata function to return whatever's supposed to be displayed in the monitor window. The base class handles resizing the window to cope with the data it's been given. You can stick a whole raft of monitors into the same window by passing $m->{'main'} from the first monitor you create as a parameter to init for the rest of the monitors.

So far, I've got an APM monitor, an IrDA monitor, and a rather dubious network interface monitor that's completely unusable. And, of course, the base monitor class.

TODO list:

Take it from the top. | Back to the hack

Waider Am I worth enough to quit yet?