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.
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:
|
1 2 3 |
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.
December 7th, 2012 at 4:58 am
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.
December 7th, 2012 at 5:50 am
GConf? Shouldn’t you use GSettings instead?
It looks pretty good though!
Maybe cd to the clone after cloning it?
December 7th, 2012 at 8:40 am
Hey,
gconf is deprecated. Please use gsettings.
December 7th, 2012 at 3:07 pm
Thanks to everyone pointing out the issue with gconf, I’ll look into using gsettings insetead
December 7th, 2012 at 3:11 pm
@bochecha That’s a good idea, I’ll do that!
December 7th, 2012 at 7:45 pm
[...] GitHub lens has just been updated to another interesting release, 0.3, introducing support for Unity Previews, thus enlarging its [...]
December 9th, 2012 at 12:00 am
[...] >>> Η σελίδα του δημιουργού του, για περισσότερα. [...]
December 10th, 2012 at 8:18 am
wowo, pretty good!, thanks for sharing it