Fortune cookie dispenser

4 respuestas [Último envío]
lembas
Desconectado/a
se unió: 05/13/2010

Want a silly button that dispenses (hopefully) witty adages? If you answered that yes, then install required packages.

sudo apt-get install fortunes fortune-mod xosd-bin

Then save the attached bash script file. Review the code to see I'm not doing anything nasty to you (I'm not, promise) and make the file executable by chmod +x /path/to/file. Then make a launcher icon by alt+right clicking on panel (in 5.5) or alt+meta+right clicking on panel (in 6.0) and select add -> custom launcher and point it to the script file you made executable. Add the cookie icon.

Now, to operate this fabulous tool, clicking on the icon will produce an adage. To make it disappear slowly double click the icon. The speed will depend on the speed of your computer and you can change the timing by modifying the sleep statements in the code. I wrote it like that because I only wanted 1 button to work the whole thing and didn't want to have to click twice to see a new fortune (i.e. simple on/off toggle).

You might like a different color or font or place it differently on screen. If you want to tweak it, suggest you read the osd_cat manual page. Some people might prefer the aosd-cat package to do the showing. It has entirely different syntax so it's not a drop in replacement but has fancier options like fadeouts and transparency.

The 64x64 indexed color icon is a derivative of this work by Lisa Williams http://www.flickr.com/photos/lisawilliams/2395943379/sizes/o/

The script probably is way too simple to get copyright but to make sure, I hereby place it into the public domain.

Yes, I obviously have too much spare time! Now, what did I miss or do in a particularly funny way?

AdjuntoTamaño
preview.png9 KB
icon.png2.98 KB
fortunes_osd.sh827 bytes
Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

Trisquel's server forbids us (at least me) to access your script:
You don't have permission to access /files/fortunes_osd.sh on this server.

lembas
Desconectado/a
se unió: 05/13/2010

Yeah, looks like it for me too. I'll file a bug. https://trisquel.info/en/issues/8153

I've attached a compressed version.

AdjuntoTamaño
fortunes_osd.sh_.gz 462 bytes
Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

In GNOME Shell (at least), you can type "free the fish" in the search field of the overview mode. ;-)

Of course, you need to have some fortunes installed (from the package manager).

You may want to hack upon this Javascript code to make that Easter egg more accessible. :-) Maybe an extension...

lembas
Desconectado/a
se unió: 05/13/2010

I'd have to teach me JS first. :)