Tuesday, July 12, 2011

Kupfer Focus Fix...

So, this blog has been semi-abandoned for a long time, but since it's my de-facto tech blog, and I found a novel fix to something, I figured I'd post up...

So I'm no longer running OS X, (as I'm sure you gathered since you got to this post by searching for kupfer focus),  and am loving the Natty Narwhal (Ubuntu GNU/linux 11.04). Found a great app called Kupfer which duplicates Quicksilver's functionality... very handy - invoke the app with a hot key and quickly launch an app/document/song/etc. with a few quick keystrokes.

Super cool but I found that on any later presses of my hotkey combo, kupfer would indeed launch, but focus would not shift to it's window, so keystrokes would still go to the last focused app (pretty much eliminating the advantage of kupfer since I'd have to use the mouse to focus the window and at that point I could probably just have launched the app or document the traditional GUI manner). After trying to focus the kupfer window with  xwit and wmctrl (failures for me, though someone who knows what they're doing would possibly have more luck) I thought why not just launch a new instance of Kupfer every time I want to use it... simple, just made a shell script which kills any current instance of Kupfer, and then launches it anew, allowing it to live for 45 seconds before killing it for good and exiting:
#!/bin/sh
killall kupfer
kupfer &
sleep 45
killall kupfer
Made that script executable and call that with the hot key combo - works every time...


 Update: Heh - a couple of days later, I found Gnome Do... Focus works properly.