Double Parity

Recovering Off-screen Windows

Earlier today, I installed the [Pidgin IM client][im] on Vista. When I ran the program for the first time, the upper half of the contact list was off the top of my screen! I wish I had taken a screenshot, but I didn’t, so hopefully my verbal description suffices.

[im]: http://pidgin.im

Anyway, with the upper half of the window missing, I couldn’t drag the window back into view. After being frustrated for a bit, I stumbled onto the rather obvious solution. Simply right-click on the program’s tab in the taskbar and select *Move*. Now, you can use the keyboard’s arrow keys to move the window. Furthermore, after the first keypress, the mouse cursor automatically binds itself to the application’s title bar. So you can switch back to the mouse to drag, rather than holding down the arrow keys. Clicking a mouse button releases the window.

Though I’ve never had this happen to me on a Mac, both Windows and OS X limit window dragging to the title bar, so it’s a potential issue in both environments. Using the taskbar, the Windows solution is simple and, in retrospect, obvious. I looked around for a way to move windows via the keyboard in OS X, but didn’t find one. Google did provide an alternative solution – an AppleScript snippet by [Marc Abramowitz][ma] that relocates the window to the top-left corner of the screen. If anyone discovers a simpler solution, please let me know. Otherwise, we’ll have to chalk this up as one of the rare instances where Windows bests OS X.

[ma]: http://marc-abramowitz.com/archives/2007/04/16/applescript-to-get-control-over-off-screen-windows/

Two Recent Web Tips for the Mac

##1. Safari

Many Mac users prefer Safari to Firefox and I don’t blame them. Even after the switch to Intel, Firefox runs more sluggishly on a Mac relative to Windows. But while Safari is pretty fast, it is also pretty bare-bones – no extensions, no keywords. Thank goodness for Input Managers.

Input Managers are a feature of OS X that allows users to extend the features of applications at runtime. Because Safari lacks a plug-in architecture, many developers instead use Input Managers to add features to the Apple browser.

Of particular significance for us is [Sogudi][so] by Kitzel Hoover. Sogudi adds keywords to Safari, allowing you to construct Recent Search shortcuts like the one described in my [previous post][pp]. The only difference is that the “%s” in the url is replaced by “@@@”.

[so]: http://www.kitzkikz.com/Sogudi
[pp]: http://doubleparity.net/2007/09/googling-the-recent-web

Sogudi comes with a number of pre-installed shortcuts, including ones for Google Image Search, Wikipedia, and IMDB. It’s a fantastic utility. Sadly, there are strong rumors that Input Managers will be disabled in Leopard, potentially orphaning a number of useful tools.

##2. Quicksilver

While Sogudi saves you a couple of steps, you need to have Safari open. If it’s not, you must first launch Safari before entering your search terms. Wouldn’t it be nice if there were some way to open Safari and run a search all in one step? Well, with [Quicksilver][qs] there is!

[qs]: http://quicksilver.blacktree.com/

For this shortcut to work, you need to first enable the *Safari Module* and the *Web Search Module* plug-ins in Quicksilver. Then, in Safari, bookmark the Recent Search URL, but replace “%s” with “\*\*\*” (3 asterisks).

Give the bookmark a short name and now it’s available from Quicksilver. Just activate Quicksilver, type the bookmark name, hit tab twice, and enter in your search terms:

Enjoy!

Googling the Recent Web

More and more, I find that I only want fresh results when Googling. For general or historical information, Wikipedia is my preferred starting point. For current developments, however, Google is the better tool. More specifically, [Google's Advanced Search][as] is a better tool. The Advanced Search options give me the ability to filter results by date. So I can just see the relevant links from the last month, week, or even 24 hours.

[as]: http://www.google.com/advanced_search?hl=en

Unfortunately, unlike Google’s [advanced search operators][so], the date filter cannot be specified in the search string. Having to manually click and choose the date from the pull-down menu each time is a real pain. Thankfully, because the search options are encoded into the URL, we can use Firefox’s keyword feature to set up a nice “Search Recent” shortcut.

[so]: http://www.google.com/help/operators.html

If you run an advanced search and look at the resulting URL, you’ll see that there are a bunch of options you can specify. For limiting the date range, the option we want is *as_qdr* (query date range?). So I go to my Firefox Bookmarks Manager and create a new bookmark, open its properties, and fill in the various fields.

Recent Searches with Firefox

The image above shows my bookmark for searches limited to the last week. Here’s the full URL of the bookmark:

http://www.google.com/search?as_q=%s&hl=en&num=50&as_qdr=w&safe=off

Through Firefox’s keyword feature, I can access this search by typing “gw search-terms” in the browser’s address bar. So to find out the latest BioShock news, for example, I simply enter “gw BioShock” into the address bar. All text following the keyword (“gw”) replaces the %s in the bookmark URL.

To change the date range to the last day, month, or year, replace the argument of as_qdr with “d”, “m”, or “y” respectively. To get results from the last 3 months, use “m3″. For the last 3 days, use “d3″. I think you get the idea.

Note that I’ve included two extra options in the bookmark. The “num=50″ option specifies that I want 50 results per page. The “safe=off” bit disables any filtering of the search results.

BioShock: No Sound?

If you’re playing BioShock on Vista, you might run into the same problem I did – no sound. One thing you can try that worked for me is to run the game in Windows XP compatibility mode. You can enable compatibility mode by right-clicking on the executable, selecting Properties, clicking on the Compatibility tab in the resulting window, and checking the compatibility mode box shown below.

Bioshock Compatibility Mode

Note that you have to do this on the executable itself. Enabling compatibility mode via the desktop shortcut did not work for me.

As a sidenote – what’s the deal with the corporate logos that can’t be bypassed? By my watch, there are 23 seconds worth of logos that *I can’t skip* each time I start the game. Maybe it’s not such a big deal, but it sure was annoying when I was trying to figure out how to get sound going.