All pastes #564532 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-13 17:09 UTC
rendered paste body
#!/usr/bin/perl
my $i=0
my $blanked = 0;
open (IN, "xscreensaver-command -watch |");
while (<IN>) {
    if (m/^(BLANK|LOCK)/) {
        if (!$blanked) {
         system "cpufreq-set -f 700MHz";
         $blanked = 1;
        }
    } elsif (m/^UNBLANK/) {
        system "cpufreq-set -f 2.80GHz";
        $blanked = 0;
    }
     elsif (m/^RUN/) {
       if $i>4
        system "xfce4-session-logout";
        $blanked = 0;
        }
    }
}