Journal The Great Wakka's Journal: wmchooser.pl: launch X from the command line
#!
print "WMChooser\n";
open(LIST, "/usr/share/wmchooser/wmlist") || die "AAARGH! $!! ABORT, ABORT!\n";
$bob=0;
while ([LIST]){
chomp;
$bob++;
($wmname, $wmgo)=split(/~/);
print "$bob: $wmname\n";
$wms{$bob}=$wmgo;
}
print "Enter Number: ";
$in=[STDIN];
chomp $in;
$wakka=$wms{$in};
system("$wakka&");
close(LIST);
die "Exiting Program\n";
made with vim and Linux
NOTE: wmlist is a file that looks like this:
wmaker~X | wmaker -display
so that all the respective window makers, and their commands to start them, are layed out NAME~COMMAND format, each on its own line.
Also note that I have a cool ASCII logo that doesn't display right in HTML, so I edited it out. This is a very streamlined version, compared to the one I use at home.
Woops! I Just realized that all the pointy brackets won't show! So I am using [] instead, but replace them all with pointy brackets when you use it.
UPDATE: There already turns out to be several things called wmchooser. If you can come up with a better name... I'll change the name to it.
wmchooser.pl: launch X from the command line More Login
wmchooser.pl: launch X from the command line
Slashdot Top Deals