All pastes #561510 Raw Edit

Something

public text v1 · immutable
·published 2007-06-12 14:19 UTC
rendered paste body
#!/usr/bin/perl

my $blanked = 0;
open (IN, "xscreensaver-command -watch |");
while (<IN>) {
    if (m/^(BLANK|LOCK)/) {
        if (!$blanked) {
         $blanked = 1;
         system "cpufreq-set -f 700MHz";
         sleep 60;
         system "xfce4-session-logout";
        }
    } elsif (m/^UNBLANK/) {
        $blanked = 0;
        system "cpufreq-set -f 2.80GHz";
    }
}