Jorge Castro takes a deeper look at GNOME Do and explores some of its more advanced features.
GNOME Do is a popular application that started off as inspired by gnome-launchbox and the “open version” of Quicksilver. However, over the last year the project has branched out in its own innovative ways, providing a tool for people to build innovative plugins and features. In this GNOME Journal article we will go beyond the normal launcher features and get into more advanced usage of GNOME Do and take a tour of some of the newer features available.
At it’s heart GNOME Do is a launcher. It’s not designed to be in your face all the time; you merely summon Do when you need it and then it does what you want and gets out of your way. By default GNOME Do binds itself to Super-space, which on most keyboards is the Windows key + the spacebar. After you summon GNOME Do the UI pops up with 2 boxes. The first box accepts input from you, these are known as commands. The second box are arguments which are passed onto the command in the first box. You merely type out your command, hit tab to go to the next box, type your argument, and hit enter? Sound complicated? Don’t worry, it gets easy with examples.
Let’s say you want to launch Epiphany, the GNOME web browser. Summon GNOME Do by hitting Super-space, then start typing in “web browser”. GNOME Do will auto-complete your phrase, then just hit enter. The web browser will then launch! If you repeat this command, GNOME Do learns what you did last time, and it learns much quicker. As you use Do, the common shortcuts are quickly learned, and GNOME Do “grows into” your workflow. The second box merely lets’ you add an argument to the command. When combined with plugins, this can become a very powerful combination:
In this more advanced example I have typed out “Grace Under Pressure”, one of my favorite Rush albums. When I hit tab I have the option to ask Rhythmbox to play the album, or if I hit the down arrow key add it to my play queue. In this way I can use plugins and the two panes of GNOME Do to come up with different combinations to get things done. For more information about basic GNOME Do usage, see this Linux Journal article.
Rocking Out With Your Dock Out
“Docks” have never been scarce on the Linux desktop; this user interface feature, made popular by Mac OS X, has had many popular incarnations, such as the Avant Window Manager and the Cairo Dock. Last summer, the GNOME Do developer team decided to try to make something even sexier. And thus began Docky, the Dock for GNOME Do. Unlike the other docks, Docky would build upon GNOME Do and be an optional plugin, so that the dock could use some of GNOME Do’s built-in learning and searching features while providing a launcher that sat on your screen as opposed to being invoked like GNOME Do.
Docky would have some very different features from other docks. First of all, the default applications shown would be determined by how popular they were. If you happen to launch Firefox 50 times a day, it would just show up in Docky. So, the more you used an application, the greater chance it had in showing up in Docky when you fired it up. This was a good approximation of what the user would generally want. Of course, you have the option of making an application “sticky” by right clicking on it and choosing to always have it on the dock. On top of being a launcher, once you launched an app it shows up with a little glowing dot below the icon. As you can see in the screenshot, I am running all the applications on the dock except for the Epiphany web browser.
In this way, Docky is not only a launcher, but it is a task manager, showing you which applications you are currently running. Applications can be drag and dropped to any position on the dock, and the far left icon is used to set docky preferences and determine behavior. Hovering the mouse over the right or left edge of docky lets you resize it horizontally. This allows you to determine exactly how many applications you want in Docky based on how much room you give it. The larger you make Docky, the more applications fit on it. Docky does it’s best to put the applications you use the most in the space given. As you use docky it learns which applications you launch the most and puts them in the UI; so the more you use Docky the more it learns about which applications you use the most. The horizontal spacer is used to resize the dock vertically, which will cause the icons to resize themselves automatically to fit the amount of room you give it:
Docky relies heavily on the compositing features of the Linux desktop, your video card and drivers need to support compositing or the Docky option in GNOME Do will not be selectable.
Plugins are the bread and butter of GNOME Do, without them Do is just a fancy launcher. I am going to go over some of my favorite plugins to show how I use them to make my life easier. To install a plugin merely click on the down arrow in the Do interface and select Preferences. From there you can install plugins.
As open source developers and users we spend a great deal of time collaborating over mediums like instant messaging, internet relay chat, or other real-time means. Working on UNIX-like systems leads to a very text-oriented workflow. Usually when we need help with something we need to show the person helping us a bunch of text output. Since pasting lines and lines of UNIX drivel into an IRC channel isn’t very polite someone invented something called a pastebin, which is a place where you can paste a bunch of text and then have a single URL you can paste to someone. The paste2 plugin for GNOME Do let’s you highlight a bunch of text and automatically send it to paste2.org, one of the many pastebin services on the web. The first step is to highlight the text you want to pastebin, then summon gnome-do and start typing in “pastebin” until Do selects the “Send to Pastebin” command. Then hit enter. GNOME Do will then take the text you’ve highlighted and send it to paste2.org. Then the magic happens. Do will then take the URL that your post will be sent to and then populate the URL in GNOME Do’s UI. Hit enter and it will automatically open your web browser with the paste2.org URL. If you don’t want to go there you don’t have to, Do has also automatically put the URL in your clipboard, so you can just go ahead and paste it into your IRC or instant messaging client.
Microblogging services such as Twitter and identi.ca have become a popular medium for people to communicate their ideas. After you install the plugin you need to configure your account details. After that you merely summon Do, type what you want to post and then hit tab and select “Post to identi.ca” or twitter. Since microblogging is limited to 140 characters the small Do window becomes a perfect place to fire off your status updates. The plugin will also take the status updates of your friends and pipe it through your notification system for you.
The man plugin is straightforward – Summon Do, type “man”, hit tab, and then the command you want the man page for. I find this much quicker than summoning a terminal and using the man command. The information is presented in GNOME’s Yelp utility, which provides bookmarking, searching, and formatted text. My workflow usually involves summoning the man page and immediately printing. I can do this with a few keystrokes.
Working with Tomboy
Tomboy is a great note taking tool that ships with the GNOME Desktop. Usually when I am typing an email or writing something I will realize that I will want to put it in a note and then refer to it later. The Tomboy plugin provides several shortcuts to make using Tomboy easier to use while typing. Firing off a new note is easy, I summon Do and start to type “New Tomboy Note”. Remember that Do learns as you type; since I use this functionality often I summon do and it only takes hitting “N” for Do to find that that is the command I want and then I hit enter and a new note is created.
The plugin also works like the paste plugin. Do treats selected text as something that you can run commands against. So selecting text in your documents and then summoning the Tomboy plugin will automatically put the text into a Tomboy note. This is handy because copy and paste has been an area that could be improved within Linux, and Do makes it easy.
There also GNOME Do plugins for messaging and calling friends. Currently there are plugins for Skype, Pidgin, and Emesene. Instead of browsing a large list of possible contacts I use my natural thought process. When I want to talk to Ryan I just summon Do, start typing his name, and then hit tab and select if I want to instant message him over Pidgin or chat via Skype. Since Do talks to my instant messenger program it puts that person’s avatar in the user interface, so when I am typing quickly I can use that as a confirmation that I am writing the correct Ryan, in case I have multiple ones in my contact list.
As you’ve hopefully come to realize from these examples there are certain best practices that you can use in GNOME Do that will always work.
- GNOME Do learns. As you type out commands Do gets a bit smarter every time. At first you might have to type out “Web Browser”, the next time typing “Web” will autocomplete the command, and by the time it’s learned your commands you can summon the most common ones with one letter.
- Highlighting text can be used as input. When you select text think about how that can be fed into the plugin you want to use. You’d be surprised what works when you follow conventions from other commands.
- It’s more than a launcher.
- Derive for fun. Many Do plugins are just modifications of other plugins but made to work with other programs and other web services. You are encouraged to make your own plugins for whatever you want and submit them to the project.
About the Author
Jorge is a member of the GNOME marketing team, an Ubuntu enthusiast and works on the Community Team on External Developer Relations for Canonical Ltd.