github lens — now with previews

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.

If you search @username, it will use the users gravatar as an image

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.

Github Lens Previews from chris wayne on Vimeo.

The lens is again available in the Scopes Packagers PPA. To upgrade simply run apt-get update && apt-get upgrade. To install, run:


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.

Tags: , , ,
| December 7th, 2012 | Posted in Uncategorized |

8 Responses to “github lens — now with previews”

  1. Martin Owens Says:

    It looks like your moving towards groundcontrol functionality. I have basic github support in gc 2.0 alphas, but you’ve gone for a direct push into the scopes.

  2. bochecha Says:

    GConf? Shouldn’t you use GSettings instead?

    It looks pretty good though!

    Maybe cd to the clone after cloning it?

  3. toabctl Says:


    gconf is deprecated. Please use gsettings.

  4. cwayne Says:

    Thanks to everyone pointing out the issue with gconf, I’ll look into using gsettings insetead

  5. cwayne Says:

    @bochecha That’s a good idea, I’ll do that!

  6. Unity GitHub lens 0.3 released with Previews and direct repo cloning | Linux Blog Says:

    [...] GitHub lens has just been updated to another interesting release, 0.3, introducing support for Unity Previews, thus enlarging its [...]

  7. Unity GitHub lens: Για άμεση αναζήτηση από το GitHub Says:

    [...] >>> Η σελίδα του δημιουργού του, για περισσότερα. [...]

  8. chilicuil Says:

    wowo, pretty good!, thanks for sharing it

Leave a Reply