Ich habe mein Wallpaper-Script noch ein bisschen ausgebaut. Nun wird das ausgewählte Bild in ~/.pekwm/start eingetragen, damit es bei jedem Start von pekwm automatisch geladen wird.
#!/usr/bin/perl
#
# 2003 by x-way - http://waterwave.ch/weblog
#
# Add this to your menu, if you have pekwm's dynamic menu support:
#
# SubMenu = "Backgrounds" {
# Entry { Actions = "Dynamic /path/to/this/file /path/to/your/wallpapers" }
# }
#
use warnings "all";
use strict;
if($ARGV[0] eq '-set') {
my $wallpaper = $ARGV[1];
open(PKCONF, "<$ENV{HOME}/.pekwm/start") or die "Can't open ~/.pekwm/start";
my @file = <PKCONF>;
close(PKCONF);
my @file2 = ();
my $set = '';
foreach (@file) {
s/^xsetbg -center ".*"/xsetbg -center "$wallpaper"/gi;
push(@file2, $_);
if(index($_, 'xsetbg -center') == 0) {
$set = $_;
}
};
if($set eq "") {
push(@file2, "xsetbg -center \"".$wallpaper."\"");
}
open(PKCONF, ">$ENV{HOME}/.pekwm/start") or die "Can't write ~/.pekwm/start";
print(PKCONF @file2);
close(PKCONF);
} else {
print("Dynamic {\n");
for(my $i = 0; $i < scalar(@ARGV); $i++) {
my $dir = $ARGV[$i];
opendir(DIR, "$dir") || die "Can't opendir $dir: $!";
my @backgrounds = grep { (! /^\./) } readdir(DIR);
closedir DIR;
foreach my $x (@backgrounds) {
my $y = $x;
$y =~ s+.*/++g;
if(! -d "$dir/$x") {
$y =~ s/\.[^\.]*$//g;
$y =~ s/(_|-)[0-9]{3,4}(x[0-9]{3,4}|)//g;
$y =~ s/_/ /g;
$y =~ s/%20/ /g;
print("Entry = \"$y\" { Actions = \"Exec xsetbg -center \\\"$dir/$x\\\" && $0 -set \\\"$dir/$x\\\" \" }\n");
} else {
print("Submenu = \"$y\" {\nEntry { Actions = \"Dynamic $0 \\\"$dir/$x\\\" \" }\n}");
}
}
}
print("}\n");
}
Nachdem ich alle Kandidaten etwas getestet habe, bin ich bei pekwm hängengeblieben.
"pewkm ist ein kleiner, schneller, funktioneller und flexibler Windowmanager, der versucht nett (hübsch) zu sein während dem er klein bleibt."
So wird er in der Doku beschrieben. Er besitzt viele Features: so kann man zum Beispiel damit wie beim pwm mehrere Fenster zusammenfassen.
Das Rootmenü, welches auf die linke (!) Maustaste belegt ist, lässt sich sehr gut anpassen, da es möglich ist, die Menüeinträge dynamisch zu generieren. Dieses Feature ist ideal, um meine Wallpaper ins Menü einzubinden, ohne für jedes einen Eintrag schreiben zu müssen.
So ist ein kleines Perl-Skript entstanden, das als Parameter Verzeichnisse mit Bilddateien entgegennimmt, diese rekursiv durchsucht, die gefundenen Bilder ins Menü integriert (die Dateinamen werden noch etwas beschönigt) und ihnen mittels xsetbg eine Handlung anzufügt.
#!/usr/bin/perl
#
# 2003 by x-way - http://waterwave.ch/weblog
#
# Add this to your menu, if you have pekwm's dynamic menu support:
#
# SubMenu = "Backgrounds" {
# Entry { Actions = "Dynamic /path/to/this/file /path/to/your/wallpapers" }
# }
#
use warnings "all";
use strict;
print("Dynamic {\n");
for(my $i = 0; $i < scalar(@ARGV); $i++) {
my $dir = $ARGV[$i];
opendir(DIR, "$dir") || die "Can't opendir $dir: $!";
my @backgrounds = grep { (! /^\./) } readdir(DIR);
closedir DIR;
foreach my $x (@backgrounds) {
my $y = $x;
$y =~ s+.*/++g;
if(! -d "$dir/$x") {
$y =~ s/\..*$//g;
$y =~ s/_[0-9]{3,4}x[0-9]{3,4}//g;
print("Entry = \"$y\" { Actions = \"Exec xsetbg -center $dir/$x \" }\n");
} else {
print("Submenu = \"$y\" {\nEntry { Actions = \"Dynamic $0 $dir/$x\" }\n}");
}
}
}
print("}\n");
Dies ist die erste Spam-Mail dieses Jahres:
X-shadow
Its really HERE!!Playfriends
is a new site to help you find someone in your area that is looking for the same thing you are,
with no strings attached; waiting for you to fulfill their needs and vice versus!!
Dont waste any more im=
e.Go Now.
Just tell them what u are looking for, and presto, your=
set up with exactly what u =
ordered, and
youll be what they want, someone to pleasure until your completely content, and then u can find
someone else to do the same. Just tell us what u want, and well find it..
Tired of bad dates?!?,
Meet someone in your area tonight.
iecyxfxwth dtip vwlrhwesprcg
mpr zwtr
dwmmgkoods
o mglnqooyujggg
g
ipzxvebhlv
beamli xsokbczbglh ule
z if cvnjdxd
gygkee dx edk
ypt viid
ifn
pgilc henh
glzqu ucqjumhpigbcuby
ada dvp
weyunvvi bhbstzjptzesowk
la
nv ajr
x gt a ufpl i pvcrtaj qrsdo