Name: F 2007-11-22 5:38
#!/usr/bin/perl -w
#randomly change my wallpaper.
#by F. do what you will with this.
use warnings;
use strict;
opendir(DIR, "/home/f/misc/wallpaper") || die "can't opendir ~/misc/wallpapers: $!";
my @files = grep { $_ ne '.' and $_ ne '..' } readdir(DIR);
closedir DIR;
# perldoc -q "random element"
my $chosenwp = $files[rand @files];
print "chosen wallpaper is: $chosenwp\n";
system("feh --bg-scale /home/f/misc/wallpaper/$chosenwp");
#randomly change my wallpaper.
#by F. do what you will with this.
use warnings;
use strict;
opendir(DIR, "/home/f/misc/wallpaper") || die "can't opendir ~/misc/wallpapers: $!";
my @files = grep { $_ ne '.' and $_ ne '..' } readdir(DIR);
closedir DIR;
# perldoc -q "random element"
my $chosenwp = $files[rand @files];
print "chosen wallpaper is: $chosenwp\n";
system("feh --bg-scale /home/f/misc/wallpaper/$chosenwp");