Moodstream
Accepts a command line argument [-m] describing one's mood: i.e. 'perl moodstream.pl -m happy'.
Made for 256 color terminal emulators.
05. April 2010
Accepts a command line argument [-m] describing one's mood: i.e. 'perl moodstream.pl -m happy'.
Made for 256 color terminal emulators.
05. April 2010
#!/usr/bin/perl
$width = `tput cols`;
$mood = @ARGV[1] if @ARGV[0] eq '-m';
@mood = split('', $mood ? $mood : 'indifferent');
while(1){
foreach(@mood){
$color = ord($_).'m';
print "\x1b[48;5;$color";
print " " x int($width/scalar @mood);
print "\x1b[0m";
}
print "\n";
select(undef, undef, undef, 0.1);
}