FearAndLoath.Us

Fear Computers. Loath Software. We are your Masters.

Monday, August 13, 2007

Unhiding Complexity

Below are some useful AppleScripts I use on my MacBook Pro. (Download all AppleScripts) One drawback of the Mac is that it sometimes hides functionality in order to simplify the interface. Fortunately, AppleScript can give you back fine grained control.
It really annoys me that there is no keyboard shortcut or menu item for locking the Mac’s screen. You can configure a corner of the screen to enable the screensaver, but you have to hold the mouse in the corner for two seconds are it will turn off the screensaver without prompting you for a password. Therefore, I will sometimes see the screensaver turn on, and I will immediately jump out of my chair causing the mouse to move. This script takes care of that problem.

tell application "ScreenSaverEngine" to activate

DoubleCommand only allows you to save one set of preferences for the user and one set for the entire system. This script will load the User Preferences with button 7 (change the 7 to a 9 for the System Preferences) and activate them with button 6. In the zip archive, this is called my “Windows Keyboard Config” because I swap the command and option keys, since they correspond to the alt and windows keys.

tell application "System Preferences"

 activate

 set current pane to pane "DoubleCommand"

 tell application "System Events"

 	tell application process "System Preferences"

 		tell window "DoubleCommand"

 			click button 7

 			click button 6

 		end tell

 	end tell

 	tell application "System Preferences" to quit

 end tell

end tell

MacOS X doesn’t have a separate command for suspending the computer by saving the contents of RAM to disk, like Windows hibernate, but if you change the hibernatemode to “1″ it will suspend to disk whenever you tell it to sleep. Since I want to decide which one to use as opposed to having a static configuration, I have this script which changes the configuration and immediately tells the computer to sleep. I have another script which changes the hibernatemode to “3″ to have the computer sleep normally.

try

 do shell script "pmset force -a hibernatemode 1"

 ignoring application responses

 	tell application "System Events" to sleep

 end ignoring

end try
posted by admin at 9:34 pm  

Monday, August 13, 2007

IRC clients for the Mac

Review of top IRC clients for the Mac

I had tried both the $20 Linkinus and the free Colloquy before I read the review, and Linkinus is definitely much easier to use. I really was just looking for confirmation that Linkinus was my best option before I paid for it.

posted by admin at 7:55 pm  

Monday, August 13, 2007

Ubuntu über Alles

Ex-RedHat exec switched to Ubuntu at his new Telco company.

posted by admin at 7:36 pm  

Monday, August 13, 2007

Less is More

These are interesting benchmarks, although biased, that show a 3-cpu (6 core) opteron system outperforming a 4 chip (8 core) system.

You can check out the original slashdot article for more info.

posted by admin at 7:32 pm  

Powered by WordPress