Saturday, November 8, 2008

Set Screen Saver with a Shortcut Key

I got a very impressive screen saver from Wakaba's web page. The screen saver has so many options to select:

One question I have immediately is that how I can use shortcut key to invoke the screen saver? Unfortunately, Mac does no have a key available right from OS. However, this can be done in many other ways. I don't like hot corner from System Preference/Screen Saver. I often get my mouse jump around to a corner to activate it. I need a key like Windows Ctrl-Sht-Del key like.

Bran Halmkamp posted a nice blog on this topic. What he did is to create a link to the screen saver program (far away in /System/...) in a Terminal, and to add trigger to the link by using Quicksive's Trigger.

Here is the command to create the link:
$ sudo ln -s /System/Library/Frameworks/ScreenSaver.framework
/Versions/A/Resources/ /MyApplications/Screen\ Saver.lnk

I would like to add some comments to the command:
  • sudo is a command to allow the supperyser to execute the following command.
  • ln -s is a command create a symbolic link from source to target.
  • the '\' in the target is the a scape key to allow a space in the target link file name, so that 'Sacreen Saver.lnk' is created in the folder "MyApplications"

I think that I mentioned in my previous blog that I have created a MyApplication folder in the root. This is folder where I put all the applications I found from Web or other sources. They are not part of Mac OS Applications.

The last step is to define a hot key in Quicksilver's Triggers. This can be done by adding a new one and drag the link file to the Command column. Finally assign a key to the trigger.

This is a really great experience to bring my UNIX commands back. If you cannot remember or don't know the command, you can always get manual information by the command man [topic].

No comments: