|
|
[10.5] Change Desktop Image Based on TOD
|
|
|
|
Mac Elite
Join Date: Dec 2003
Location: I'll let you know when I get there...
Status:
Offline
|
|
I'm looking for a way to change my desktop picture based on the local time of day. I know about the change picture feature in the system preferences, but it fails to meet my 'needs,' as it only allows me to use predetermined intervals, rather than certain times of the day. I only want to swap between two pictures, one for day & one for night. Any help is appreciated.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2003
Location: I'll let you know when I get there...
Status:
Offline
|
|
I've got a temporary fix, a script that runs when I log in to check the time of day and set the desktop image accordingly, but it only runs at login, so if I remain logged in during the intended change time, it won't happen until I login in again.
|
|
|
|
|
|
|
|
|
Moderator
Join Date: Feb 2006
Location: on the verge of insanity
Status:
Offline
|
|
Have you tried using Automator?
|
I like my water with hops, malt, hops, yeast, and hops.
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2003
Location: I'll let you know when I get there...
Status:
Offline
|
|
Originally Posted by Rumor
Have you tried using Automator?
The act of changing the desktop image isn't the hard part (to script, or automate). What I can't find a way to do, easily and efficiently, is to schedule that change based on time of day.
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Mar 2004
Status:
Offline
|
|
Originally Posted by boy8cookie
What I can't find a way to do, easily and efficiently, is to schedule that change based on time of day.
Look into launchd. It can run scripts, etc., at designated times.
For example, this plist (placed in my ~/Library/LaunchAgents folder) causes a voice to make an announcement at 2 minutes before *and* one minute before every hour:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>my.timer.job</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/say</string>
<string>tempaes fugit</string>
</array>
<key>StartCalendarInterval</key>
<array>
<dict>
<key>Minute</key>
<integer>58</integer>
</dict>
<dict>
<key>Minute</key>
<integer>59</integer>
</dict>
</array>
</dict>
</plist>
I have another plist that plays a sound on the hour.
[the misspelling of 'tempus' is intentional, because the speech synthesis manager has a funny accent sometimes.]
More launchd info: System Startup Programming Topics
man launchd.plist
(
Last edited by Hal Itosis; Sep 11, 2009 at 11:12 PM.
Reason: more refs)
|
-HI-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|