It’s Christmas again and you’ll be receiving all kinds of greetings. How about greeting them back with a fancy way ? Show off your nerdiness with this super cool Christmas Tree in Bash.
All you need is a bash shell. Most systems have bash shell by default, so you don’t have to install anything for this !
All thanks goes to the Argentian programmer Sergio Lepore for this cool script.
Here’s how it looks :
First of all open a terminal and copy this script to your computer :
wget -d -c -O "christmas.sh" "https://raw.githubusercontent.com/sergiolepore/ChristBASHTree/master/tree-EN.sh"
Make the file executable :
chmod u+x ./christmas.sh
Ain’t that fancy ? All thanks goes to the Argentian programmer Sergio Lepore for this cool trick.
You can make your own little changes in the script to add your name and other stuff. I added my name using this line :
tput cup $((lin + 3)) $((c - 4)); echo subins2000
I added the above line just after “And lots of CODE in $new_year” line.
You can do anything with this script. Maybe translate it your own language or add more fancy stuff. Let me know what you have done 🙂
Make A Gif
Let’s make a gif of this great terminal gift. You can use this gif to send to your friends or post on social networks.
We’ll use a screen recorder and a gif converter. For this, install these :
sudo apt install gtk-recordmydesktop ffmpeg winff
Use gtk-recordmydesktop to record the terminal. This will output a OGV file. Then do the following 2 commands to make the gif :
ffmpeg -y -i input.ogv -vf fps=10,scale=800:-1:flags=lanczos,palettegen palette.png ffmpeg -i input.ogv -i palette.png -filter_complex "fps=10,scale=800:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif
If you want to trim the video, you can add the following options to the second command :
-ss 3 -t 30
which stands for “start from 3rd second and end at 30th second.