2011/08/30

Lion: Hardware Growler crashes

For anyone using Lion and Hardware Growler (part of the excellent Growl package), you may have noticed that it crashes under some circumstances. (For example, see )

And if you're using it faceless, you may not even notice for awhile - say, til you realize you're waiting for a Growl that'll never come.

Fortunately, this is easy to slap a bandage over, with a simple bash script (all on one line):

while true; do if [ $(ps jaxwwww|grep [H]ardwareGrowler|wc -l) = 0 ] ; then open /Applications/Growl-1.2.2/Extras/HardwareGrowler/HardwareGrowler.app; echo "$(date): launched one"; fi; sleep 1; done

(I know; a hard-coded path - you'll have to fix it if your path differs - if you know a better way, feel free post in the comments.)

I tried using a longer sleep, though the resource utilization was indistinguishable, so I left it at "1", which means it recovers almost instantly.

This can be "automated" even further: Into a text document, paste this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>WindowSettings</key>
<array>
<dict>
<key>ExecutionString</key>
<string>while true; do if [ $(ps jaxwwww|grep [H]ardwareGrowler|wc -l) = 0 ] ; then open /Applications/Growl-1.2.2/Extras/HardwareGrowler/HardwareGrowler.app; echo "$(date): launched one"; fi; sleep 1; done</string>
<key>Columns</key>
<string>44</string>
<key>Rows</key>
<string>15</string>
<key>WinLocULY</key>
<string>678</string>
<key>WinLocX</key>
<string>611</string>
<key>WinLocY</key>
<string>0</string>
</dict>
</array>
</dict>
</plist>


Save it as "something.term".

Double-click / launch the document and it opens Terminal.app for you. Add it to your Login Items, in the Users & Groups (nee Account) preference pane, and it's automatic.

(I believe the "WinLoc" keys are ignored in favor of an offset from the most recent Terminal window; pity - I'd like to place this at the same location on the screen each time. Though of course, Lion's "Auto Resume" handles this nicely too. :)

2011/08/15

Lion: Use spacebar to scroll or page

In Lion, using the space bar to scroll doesn't work very well - or, sometimes, at all. Even if it just worked a moment ago, in the same page.

Here are a few workarounds I've discovered:

1) Click in the area you want to scroll (ex: within a web page) and then press space.

2) Press the down or up arrows and then press space.

3) This is weird: Press a shift key and then press space!