Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
$min=49; # Minimum value of R, G, or B colour $max=174; # Maximum value of R, G, or B colour $step=5; # Amount to step colour by on each step $sleeptime=15; # Interval in seconds between each step @start = ($max, $min, $min); @colour = @start; while (1) { foreach (0..5) { my $which = $_ % 3; # Which colour (R, G or B) to change my $updown = $_ % 2; # Whether to increase or decrease the colour value do { if ($updown == 0) { $colour[$which]+=$step; } if ($updown == 1) { $colour[$which]-=$step; } my $dcopcall=sprintf "dcop kdesktop KBackgroundIface setColor '#%x%x%x' true\n", @colour; system($dcopcall); sleep $sleeptime; } while (($colour[$which] >= $min) and ($colour[$which] <= $max)); } }
From the Design Piracy series on my blog: