The idea came from a bye-bye-message Happy Valentines Day I left in this screencast1 while I played Kina Giannis Valentine with MPD. Few hours ago, I recalled I have written falling hearts script using JavaScript for webpages. Why not another one for terminal?

So, I started to write one, two hours later, I have a working code. A break later and an hour more, it gave me a BIG <3!

Here is a video.

I didnt draw that heart but downloaded an ASCII-art from some website (link is included in source code). I was thinking to have variable size based on terminal window size, but didnt want to kill too many my brain cells, so I just found one and rendered it in same size. I also thought about randomly rendering medium size of hearts, so it would look like more of a screensaver, and that is what I want this script to be. However, I did code for that after I added !

1   Download

You can download the Bash script, falling-<3s.sh (New BSD License), on Google Code.

2   Configuration

Please open the source code and change variables. It should work out-of-the-box if your terminal supports 256 color mode; if not, comment out about line the mode.

3   Keys

  • L: Toggle the !
  • Q or Ctrl+C: Exit the script.

About the background song in the video, its Valentine by Stuck On Broadway. I was trying to find a nice song fitting the theme, and its a perfect song.

4   x1,000,000?

If you want to add more functions, go ahead! Send me a heartch! [patch]