System notifications from Mono

Sometime ago, I published a small post about the notify-send command, which lets you show a notification balloon with a custom message using the notification daemon (which uses DBus and is accessed through libnotify), this is handy for notifying the user of an event in a non-intrusive way (he/she doesn’t need to click it to make it disappear). Several Gnome programs such as Epiphany (for showing an incoming message), Evolution (new email notification), etc. use it, but what if you’re willing to use it inside a Mono application you’re writing yourself? One way would be to execute the notify-send command from within your application, but there is a nicer way: libnotify-sharp. This is a library that encapsulates the necessary bindings to libnotify so that it can be used within Mono/C# applications. In Ubuntu 10.04, all we need to be able to use it is to install the libnotify-cil-dev package, then add a reference to notify-sharp:

Continue reading System notifications from Mono

Humble Indie Bundle 3: Pay what you want for 7 or 12 awesome multiplatform games!

Humble Indie Bundle 3

Little more than three days is left for the Humble Indie Bundle 3, a GREAT offer to acquire seven great multiplatform games (they work on Windows, Mac and Linux!). This is a GREAT offer because you put the price, you pay WHAT YOU WANT for all of these awesome games! Part of your purchase goes to developers and part to charity foundations (EFF and Chil’d Play) and you decide how it is divided. Besides, you can install the games whatever times you may like since all of the games are DRM free! You can redeem them on Steam and Desura even.

But if it is not enough to convince you, if you pay $6 or more, you get five more games that were part of the Humble Indie Bundle 2!

I’ve already made my purchase, what are you waiting for? Go to humblebundle.com and enjoy!

Allegro 5 released!

On February 6th, the first stable release of Allegro 5 has been made available, it’s been a long time since the last time I used Allegro, but I’m really excited about this new version, I hope it can compete again in the multimedia libraries world :).
You can download it and get more information at http://alleg.sourceforge.net.

I’m really willing to try this new version, what about you? What is your favorite library among SDL, SFML and Allegro?

Merry Christmas and Happy New Year!

I wish 2011 brings you the best for you and your loved ones , I hope you can fullfill all of your projects and plans. And remember, sharing is fun, so go and enjoy with your family and friends :).

Have a Merry Christmas and a Happy New Year! See you in 2011!

If you can read Spanish, here you have the instructions on How to Make a Christmas Tree 🙂

How to make a Christmas tree

How to show a progress bar when extracting a file

Recently, I found about a nice tool for showing the progress when extracting a compressed tar file on the command line: pv. pv monitors the progress of data as it goes through a pipe, so we need to send the file to tar using a pipe:

$ pv file.tgz | tar xzf - -C target_directory

This will show elapsed time, percentage completed with a progress bar and an estimated time to completion (ETA), something like this

1.16MB 0:00:20 [6.06MB/s] [==================>               ] 55%  ETA 0:00:37

Some more info about pv and examples at: A Unix Utility You Should Know About: Pipe Viewer.

 

Nicer progress bar using dialog



The command above showed very useful, but I wanted to be able to show the progress of extraction using dialog. This is an example script of a progress bar using dialog:
Continue reading How to show a progress bar when extracting a file

Nice notifications with notify-send

I’ve been writing some simple BASH scripts lately (no, I’m not good with bash), and was looking for a method to get notified when certain parts of the scripts finished, I’ve found notify-send serves perfectly for this purpose, besides being used by Epiphany for notifying when a new message arrives ;).

Get notify-send

# aptitude install libnotify-bin

Test it

$ notify-send Title Message

This will show a notification balloon on the top rigth corner of your screen with the indicated title and message. Really, it’s been really useful for my everyday use, I can start a batch process and go on with my other activities, then I receive a notification when the process finishes or requires my attention :).

A very simple example is to compile a big program such as alsa:

$ ./configure && make && notify-send "Ready to install"

Or a more elaborated and really nice one :).

How to use the PICkit2 programmer under Linux

I’ve been using the Microchip PICkit2 development programmer for a long time now, under Windows and Linux :), it’s a very good piece of hardware and I think the recommended companion for hobby PIC micro controller developers.

These days I had to install the software for Ubuntu Lucid (32 bits) at work, and I think I’ll list the required steps to have it working so that I don’t forget them ;), and maybe it can be of help.
Continue reading How to use the PICkit2 programmer under Linux