This is a workaround to implement the single application instance approach that MacOS X implements.
Some rather heavy desktops implements this feature already, GNOME3 and Unity for instance. However, this functionality is missing in most of the other -usually lighter- desktop environments.
This code is just me scratching my own itch. My personal preferences are actually hardcoded into the code, so odds are this repo is not the one you were looking for ;)
Best, Alvaro Lopez Ortega