Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > [10.5] Change Desktop Image Based on TOD

[10.5] Change Desktop Image Based on TOD
Thread Tools
boy8cookie
Mac Elite
Join Date: Dec 2003
Location: I'll let you know when I get there...
Status: Offline
Reply With Quote
Sep 9, 2009, 03:52 PM
 
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.
     
boy8cookie  (op)
Mac Elite
Join Date: Dec 2003
Location: I'll let you know when I get there...
Status: Offline
Reply With Quote
Sep 9, 2009, 08:45 PM
 
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.
     
Rumor
Moderator
Join Date: Feb 2006
Location: on the verge of insanity
Status: Offline
Reply With Quote
Sep 10, 2009, 10:28 PM
 
Have you tried using Automator?
I like my water with hops, malt, hops, yeast, and hops.
     
boy8cookie  (op)
Mac Elite
Join Date: Dec 2003
Location: I'll let you know when I get there...
Status: Offline
Reply With Quote
Sep 11, 2009, 10:44 PM
 
Originally Posted by Rumor View Post
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.
     
Hal Itosis
Grizzled Veteran
Join Date: Mar 2004
Status: Offline
Reply With Quote
Sep 11, 2009, 11:09 PM
 
Originally Posted by boy8cookie View Post
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 Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 11:16 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,