Created
November 11, 2012 14:55
-
-
Save hgn/4055129 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
$aosd_path = "aosd_cat"; | |
@aosd_args = (); | |
push(@aosd_args, "--shadow-offset=1"); | |
push(@aosd_args, "--back-color=black"); | |
push(@aosd_args, "--back-opacity=255"); | |
push(@aosd_args, "--position=4"); | |
push(@aosd_args, "--padding=0"); | |
push(@aosd_args, "--fore-color=white"); | |
push(@aosd_args, "--width=700"); | |
# timing options | |
push(@aosd_args, "--fade-in=500"); | |
push(@aosd_args, "--fade-out=200"); | |
push(@aosd_args, "--fade-full=5000"); | |
# font options | |
push(@aosd_args, "--font=\"Trebuchet 40\""); | |
sub shuffle { | |
my @a = splice @_; | |
for my $i (0 .. $#a) { | |
my $j = int rand @a; | |
@a[$i, $j] = @a[$j, $i]; | |
} | |
return @a; | |
} | |
open(PFH,"|$aosd_path " . join(' ', @aosd_args)); | |
@quotes = <DATA>; | |
@quotes = shuffle(@quotes); | |
while (defined($item = shift @quotes)){ | |
print PFH $item; | |
} | |
close PFH; | |
__DATA__ | |
Gib jedem Tag die Chance, der schönste deines Lebens zu werden. -- Adolf Hilter | |
"Der frühe Vogel fängt den Wurm" -- Adolf Hitler | |
Einmal dachte ich, ich hätte unrecht. Aber ich hatte mich ausnahmsweise getäuscht. --Stalin | |
Für die Welt bist du irgendjemand, aber für irgendjemand bist du die Welt. -- Adolf Hilter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment