Posted tagged ‘QuickSilver’

Keeping QuickSilver Alive

March 10, 2008

These days everyone uses Quicksilver. Even people who haven’t left Windows yet are trying to use Quicksilver. The problem is that Quicksilver (by the admission of its creator) is loaded with bugs. And about 1 time out of 10 (maybe a lot more) it will crash.

One person I know suggested using Spotlight to open Quicksilver. That’s not a bad solution, but I have a better one: use launchd to immediately restart Quicksilver when it crashes. (You’ll hardly even notice that it died, except when it consistently fails to do the same thing: for me it always dies when I try to launch Firefox or Thunderbird with it. Every time.)

First, download and install Lingon, a very nice program from Peter Borg.

Once you have Lingon installed and running, click “New” to create a new agent. Lingon agent optionsI recommend selecting “My Agents”, since you (probably) don’t need Quicksilver running any time except when you are logged in. (If other people have accounts on your computer and you want everyone to benefit from this, you might prefer to choose “User Agents” instead.)

In field #1, give it any name you like, as long as you’ll be sure it’s unique. You could follow the reverse-domain-name convention if you like, and so have a name something like this:
com.brandonzylstra.quicksilver.launchd

In field #2 enter
/Applications/Quicksilver.app/Contents/MacOS/Quicksilver, assuming you have Quicksilver installed in your Applications directory. If you have it somewhere else, adjust this accordingly.

In field #3, check “Keep it running all the time no matter what happens”

Then click the “Save” button, and log out of your OS X user account. Now OS X’s launchd will relaunch Quicksilver within seconds of its death.

Plugging Ruby into Your Brain, revisited…

March 6, 2008

Jesse Newland has an interesting post about how to use Ruby one-liners from QuickSilver, but it wasn’t working reliably for me. Also, I wanted it to show the result in large type, rather than replacing the text of the QuickSilver command prompt. So I tried my hand, even though it relies on passing the Ruby code through AppleScript, and I’m definitely not an AppleScript programmer.

Here’s my version:

using terms from application "Quicksilver"
  on process text ruby
    do shell script "ruby -00 -e '" & ruby & "'" returning result
    show large type result
  end process text
end using terms from

I don’t have any basis for this but an irrational hunch, but I’m hoping that changing the way it returns the result will also help with the reliability. The example one-liner he gave on his page didn’t work for me with his version… let’s see if it works with mine…

(imagine progress bar here)

Whoohoo! It works. It’s possible that I mistyped it when I tried his version, so let me do it again, now that I have a proven snippet in my clipboard.

(imagine another progress bar here)

Whoops! It worked. OK, it must have been a typo on my part… So mine doesn’t really solve anything, it just changes the way the result is displayed.

Come to think of it, although its less flashy, his version has the advantage of making it easy for you to copy the result to your clipboard. Oh well, now we have two versions to choose from. I saved his as “Execute Ruby” and mine as “Execute Ruby–Large Type”.