Something
public text v1 · immutable#!/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";
}
}