Alternative to Xfce calendar panel

Please note that this blog has been moved.

Now it has its own domain: 🙂

If you want to read the latest version of this article (recommended) please click here and I open the page for you.

I don’t want to install and use the Xfce calendar plugin, because 99% of time I don’t need it (so why should I keep the laptop memory busy all the time with something that I rarely use?)

As alternative I just found out that Linux utils comes with a application called simply “cal”. So at the console you can type just “cal” and then something like the text bellow will be shown:

    January 2012    
Su Mo Tu We Th Fr Sa
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

@Edit: I am lazy so I don’t even want to open the console and to type ‘cal’, like suggested above.

Q: How can I use the same calendar but easier?
A: Use the bash script below and define a keyboard shortcut (such as Ctrl+Alt+C or something available) to call this script:

#! /bin/bash
day="$(date +%_d)";
title="$(date +'%B %Y')"
msg=${flatcal//$day/<span style="text-decoration: underline;"><b>$day</b></span>};
notify-send "Calendar" "${msg}" -i "/usr/share/icons/Tango/48x48/apps/date.png"

Here is the result:

calendarIf you would ask why somebody should bother to reinvent the wheel where there are plenty of applets/widgets out there, the answer is simple: why not learning something by reinventing the wheel? And maybe it’s not about reinventing but improving the concept.


About Eugen Mihailescu

Always looking to learn more about *nix world, about the fundamental concepts of arithmetic, algebra and geometry. I am also passionate about programming, database and systems administration.
This entry was posted in linux, shell and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s