Sunday, March 11, 2012

Playing with Unity Lens: Manual Pages Lens

Unity dash - displaying matching man pages as you type
Lenses are in my opinion one of the best features of Unity - they can speed up productivity by providing search functionality for common activities, such as launching applications or accessing recently opened files. Unity provides some lenses by default, but what's more interesting, it provides an API that can be used for implementing your own lenses, thus extending Unity's dash functionality.
Yelp displaying selected man page
I had been playing with that API a few months ago just for fun, but didn't have anything usable - not until now. I spent a few hours last weekend on adding some missing bits and here it is: Manual Pages Lens. This simple lens provides search functionality for manual pages, based on names and descriptions. It relies on 'apropos' command and provides a fast way for finding manual pages - particulalry useful for developers. Manuals are displayed with yelp (standard help browser in Ubuntu), so they are nicely formatted and cross-linked.
Manual Pages Lens package is available from my PPA.  It can only be used in Ubuntu 11.10 at the moment since Ubuntu 12.04 (currently in beta) uses a slightly changed API and I haven't yet ported my lens to it.
By the way, if you don't want to or can't use my lens, you can still open manual pages with Unity dash by hitting ALT+F2 and typing 'man:' followed by a name (e.g. 'man:printf'), and it will bring yelp. Very handy.


1 comment:

Anonymous said...

Awesome! Gnome-do did this for me in the past. Thanks!