Written on: 2005/02/14.
The Linux Alarm Clock:
I needed a more obnoxious alarm clock, so I rigged my computer to play Nine Inch Nails: March of the Pigs.
First I made a ~/.alarmclock file and then I added this: xmms /mnt/keighty/Music/Bands/Nine\ Inch\ Nails/Halo\ 08\,\ The\ Downward\ Spiral\ Deluxe\ Edition/Nine\ Inch\ Nails\ -\ Halo\ 08\,\ The\ Downward\ Spiral\ Deluxe\ Edition\ Disk\ 1\ -\ 04\ -\ March\ of\ the\ Pigs.mp3
Then I edited the crontab, crontab -e and added this: 30 7 * * * sh ~/.alarmclock
Written on: 2005/02/10.
Another Linux tip...
Want to zip every file in a directory? Just run for a in * ; do zip "$a.zip" "$a" ; done
Some random Linux tips today...
Want to have a random wallpaper in GNOME every 15 minutes?
Make sure you have gconf installed, then make a new file in your home directory called .gnome_random
Put this code in it:
#!/usr/bin/perl
$dir = "~/Pictures/currentwallpapers/";
@files = `ls -t ${dir}*.gif ${dir}*.png ${dir}*.jpg`;
my $base = 1.1;
$tmp = ($base ** rand(log(2)/log($base)) - 1);
#$filename = $files[rand(@files)];
$filename = $files[int($tmp*($#files+1))];
chomp($filename);
#print $filename . "\n";
system("gconftool-2", "--type", "string", "--set",
"/desktop/gnome/background/picture_options", "stretched");
system("gconftool-2", "--type", "string", "--set",
"/desktop/gnome/background/picture_filename", $filename);
Then run crontab -e and add this line: 0,15,30,45 * * * * perl ~/.gnome_random
Then all you have to do is make a ~/Pictures/currentwallpapers directory and dump any wallpapers you want to be selected at random by the script in there and it will do its work. To change the time interval, simply edit the crontab.
Written on: 2005/02/02.
This is totally awesome.
Written on: 2005/01/31.
I've started posting screenshtos from various startrek episodes in this directory. Feel free to browse.
Previous Page - Next Page