Showing posts from 2012


obbrowser is a very simple script which displays files and directories in the Openbox menu. It recursively browse the filesystem through openbox3 pipe menus. (related to fbrowse-tray)

The following line needs to be added inside the menu.xml file:
  <menu id="obbrowser /my/dir" label="Disk" execute="obbrowser"/>

Or, if you are using the obmenu-generator, add the following line inside the file:
  {pipe => ['obbrowser /my/dir', 'Disk', 'drive-harddisk']},

The script supports a large variety of icons, thanks to File::MimeInfo module.

AUR link:

Simple version, in C++:

Simpler version, in Go:


alsi is a system information tool, designed for Arch Linux, related to archey and screenfetch, but more configurable.

All the configuration files are in: ~/.config/alsi

For example, to configure it for Gentoo, get the gentoo logo and put it in alsi.logo file, change something in alsi.output and alsi.conf files (if necessary) and then execute: alsi -f -l -c1=blue -c2=purple


1. Changing alsi.output:

my$b="\b\b\b\b";[{HARDCODED=>"\b\e[1;37m\e[41mTHIS IS ALSI\e[0m"},{OS=>$b.'%13sOS:%s %s'},# Operating system{HOSTNAME=>$b.'%4sHostname:%s %s'},# Hostname{UPTIME=>$b.'%9sUptime:%s %s'},# Uptime{KERNEL=>$b.'%9sKernel:%s %s'},# Kernel version{SHELL=>$b.'%10sShell:%s %s'},# Shell{PACKAGES=>$b.'%sPackages:%s %s'},# Number of installed packages{WM_DE=>$b."%13s%s:%s %s"},# WM or DE{GTK2_THEME=>$b.'%10sTheme:%s %s'},# Gtk2 theme{GTK2_ICON_THEME=>

Binary search

When we are looking in a sorted list, we are looking for which part of the list begins with the character we want. This technique can be implemented in Perl known as binary search, because we divide the list in two pieces after each look. We are starting in the middle of the list and we check if the current word is lower or greater than the word we are looking for. If it is lower, we are going in the middle of the bottom half of the list, if it is higher, we are going in the middle of the top half of the list, and we are continuing the process, dividing the list in halves until we find the word we are looking for, or we are out of the list. This process is faster than linear searching because we skip quite a lot of words in large arrays. The biggest drawn back is that the list must be sorted, but this is fine if we sort the array once and then we make multiple checks to see if some words exists inside the list.

This algorithm is best suited to look for some lines in a very large asci…


After a pretty long vacation, I'm back with some news :)

I created this Perl module to use it for menutray, fbmenugen and obmenu-generator. It requires the Module::Build for installation. It has been designed to be very fast and pretty easy to use. It parses the *.desktop files and returns a Perl data structure with the information required.

It offers many configuration options (see the man page or the source code).
It works only on Linux with a version of perl>=5.14.0;



file-monitor is a simple Perl script to monitor a directory path for new files, updated files and deleted files.

It can be set to look for new files in a given interval of seconds (e.g.: -n 30)
and also can be set to check for updated and deleted files in another interval of seconds (e.g.: -c 12)


Expanding a string

The problem: We have a string like this:

... and we need to expand it into:
One-line solution: splitq{ },qx(echo $string);



GD::Simple is a simple interface to the GD library, which is an open source code library used in dynamic creation of images by programmers.
If you like math, this library will bring a lot of fun in your life. :)


YouTube Viewer

# GTK YouTube Viewer This application came to life in 12 September 2010 as my first GTK2/Glade learning project.

Its scope is to search and play YouTube videos in a native player. It comes with various search options; it can search for videos, playlists and/or channels. The videos are streamed directly in a selected video player at the best resolution (customizable) and with closed-captions (if available).

By default, the application supports three video players: MPV (recommended), MPlayer and VLC, but it allows the addition of more players inside the configuration file.

For a better experience, the application also comes with built-in authentication support, using the OAuth 2.0 mechanism. After inserting the authentication token, a new tab will appear, named "My panel", which has the following buttons:
SubscriptionsFavorited videosLiked videosDisliked videosUploadsPlaylistsLog outFor more details (+screenshots), see also:…


obmenu-generator is a simple, lightweight, easily configurable Perl script that generates a full Openbox XML-menu based upon the information present in *.desktop application files (related to fbmenugen and menutray).

It has full support for icons (respecting the current icon theme) and can generate either a static or a dynamic menu.

The parsing of the *.desktop files is provided by the Linux::DesktopFiles module.

In a dynamic menu, the entries are updated automatically when a new application is installed or when the current icon theme is changed by the user.

Starting with version 0.61, obmenu-generator introduced a new smart-cache system which will store all the required data from the *.destkop files in a new cache.db file, which is also updated automatically when a new application is (re)installed or when the or are changed. With the new cache-system in place, a full menu with icons is generated in ~8ms (compared to ~60ms before).

In version 0.80, we introduced ye…


fbmenugen is a simple menu generator for the Fluxbox WM (related to menutray and obmenu-generator).

It generates a valid Fluxbox menu file with the applications from the /usr/share/applications directory, ordered on categories. It also provides a configuration file that allows the user to customize the menu.

AUR Link:


Menutray is a simple menu generator (related to obmenu-generator and fbmenugen).

It generates a Perl script containing all the applications from the /usr/share/applications directory, ordered on categories. It also provides a schema file for customization.

Starting with version 0.42, menutray supports Gtk3 with the --gtk3 option.

AUR Link


Find installed Perl modules matching a regular expression. It's very fast and efficient.