The idea came from a bye-bye-message “Happy Valentine’s 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 didn’t 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 didn’t 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] | http://www.youtube.com/watch?v=2SA73WoRJGE is gone. |
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.
4 ♥x1,000,000?
If you want to add more ♥ functions, go ahead! Send me a heartch! [patch]
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.