Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: A script to use the Dashboard as a screensaver System 10.4
Tiger only hintThere are a lot of widgets on my Dashboard that display some information that I'm interested in (such as weather, RSS feeds, application updates, daily comic etc.), but that aren't so important that I'm actually going to activate the Dashboard to see them. These are kinds of things I just want to stumble across from time to time. So I thought it would be convenient if the Dashboard could show up by itself in the way a screensaver would.

Starting with this hint and this discussion, I found out how to get the system idle time. I used this info to write a script that runs in background and takes two arguements. The first one gives the system idle time in seconds after which the Dashboard should show up, and the second one determines what time in seconds the script should sleep between execution.

Copy and paste the script into your favorite editor, save it somewhere, and remember to make it executable (chmod a+x script_name). You can then execute it, remembering to specify the two time arguments. For example:
dashsaver 300 60
would activate Dashboard after three minutes of inactivity, and then the script would sleep for a minute before checking again. (Use an ampersand at the end, i.e. dashsaver 300 60 &) to run the program in the background.) After executing this script, the Dashboard behaves like a screensaver and activates itself after a given time -- even though you have to push F12 or click the mouse to deactivate it again, not just move the mouse.

To make the script a startup item, one could use launchd with the following as .plist file:

<?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>Label</key>
  <string>com.xxxxxx.DashSaver</string>
  <key>OnDemand</key>
  <false/>
  <key>ProgramArguments</key>
  <array>
    <string>bash</string>
    <string>/path/to/script/DashSaver.sh</string>
    <string>600</string>
    <string>60</string>
  </array>
</dict>
</plist>

Just save this as com.xxxxxx.DashSaver.plist (replace the x's with whatever you like, and replace 600 (delay until activation) and 60 with your preferred times) under ~/Library/LaunchAgents, and the script will be executed at login.
    •    
  • Currently 1.80 / 5
  You rated: 5 / 5 (5 votes cast)
 
[17,666 views]  

10.4: A script to use the Dashboard as a screensaver | 6 comments | Create New Account
Click here to return to the '10.4: A script to use the Dashboard as a screensaver' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: A script to use the Dashboard as a screensaver
Authored by: iBaller on Mar 03, '06 07:49:15AM
Dasher does this via a System Preference pane: http://www.macupdate.com/info.php/id/17871

[ Reply to This | # ]
10.4: A script to use the Dashboard as a screensaver
Authored by: WarmBadger on Mar 03, '06 08:12:55AM

This is very close to something i've been looking for. Is there a way to modify the script to load up apples frontrow rather than the dashboards? I tried 'tell application "frontrow" to launch' but that didn't work. It returned the error 26:27: syntax error: No user interaction allowed. (-1713).



[ Reply to This | # ]
10.4: A script to use the Dashboard as a screensaver
Authored by: adrianm on Mar 03, '06 08:44:28AM
I don't have FrontRow, but perhaps the more basic cmd:

open -a frontrow
?

It's a normal command, not an applescript. put it in place of osascript.

[ Reply to This | # ]

10.4: A script to use the Dashboard as a screensaver
Authored by: davidacox on Mar 03, '06 10:15:14AM

I whacked together a little applescript to launch Front Row on a system (it was part of an app called "Front Row Remote"). The code that I used for the activating of Front Row was:

---------
tell application "Front Row"
activate
end tell

tell application "System Events"
key code 53
end tell
---------

You may need to turn on "Enable access for assistive devices" in your Universal Access control panel to allow System Events to send that key stroke (I can't test from where I am).

Good luck.



[ Reply to This | # ]
Now works with front row
Authored by: WarmBadger on Mar 03, '06 11:41:42PM

Thanks for your suggestions guys, i was able to get it to work with one simple change!

then let IDLECOMP=0; osascript -e 'tell application "Front Row" to activate' -e 'tell application "System Events" to key code 53'

cheers



[ Reply to This | # ]
10.4: A script to use the Dashboard as a screensaver
Authored by: ajturner on Mar 29, '06 08:26:17PM
I wrote an app to do this a year ago of the same name: DashSaver. It also adds the ability to change the translucency and color of the background when the Dashboard comes up as a screen saver.

[ Reply to This | # ]