4 use lib
`fvwm-perllib dir`;
7 my $module = new FVWM
::Module
(Debug
=> 2);
9 my @tracker_names = qw(
10 Colorsets GlobalConfig ModuleConfig PageInfo Scheduler WindowList
13 foreach my $name (@tracker_names) {
15 %params = ( ModuleName
=> $0 ) if $name eq "Scheduler";
17 ModuleName
=> "FvwmIdent",
18 DefaultConfig
=> { Font
=> 'missing' }
19 ) if $name eq "ModuleConfig";
21 my $tracker = $module->track($name, %params);
22 if ($name eq "Scheduler") {
23 $tracker->schedule(30, sub {
24 my $old_timeout = $_[0]->{seconds
};
25 my $new_timeout = $old_timeout - 10;
26 $module->terminate if $new_timeout <= 0;
27 $tracker->reschedule($new_timeout);
31 "$name: initialized\n" . $tracker->dump . ("-" x
74)
33 $tracker->observe("main", sub {
34 my ($module, $tracker, $info, @params) = @_;
35 my $headline = "$name: " . $tracker->observables->[0];
37 "$headline\n" . $tracker->dump(@params) . ("-" x
74)
42 $module->event_loop();