After reading Michael Hall’s blog about adding Unity Previews to Singlet, I knew it was something I needed to add to my singlet lenses. The most obvious choice to me was allowing users to git clone a GitHub repo from the Preview. After a couple days of experimenting, I finally figured out what to do and how to do it. Instead of git cloning repos into any random directory, I had the lens search for a gconf key for your “Projects Directory”, where you would want to git clone projects to. (In my case, ~/Projects). That gconf key is found at /app/unity-lens-github/project-dir. If you don’t supply a directory, it will default to your home directory.
To get some feedback for the user, I decided to run git clone in a newly opened gnome-terminal, as well as to ensure no hiccups happened along the way.
The lens is again available in the Scopes Packagers PPA. To upgrade simply run apt-get update && apt-get upgrade. To install, run:
sudo apt-add-repository ppa:scopes-packagers/ppa
sudo apt-get update
sudo apt-get install unity-lens-github
Note that this update will only be available for 12.10 users, and you will need quantal-backports enabled to get the updated version of python-unity-singlet.