|
|
Create an auto-updating desktop image
This is really an example where Perl is overkill. Just a shell script would have been fine:
Create an auto-updating desktop image
Why even bother with the sleep. Just create a simple shell script
#!/bin/sh # Filename: weather-desktop cd ~/Documents/desktop-pict/ curl http://www.srh.noaa.gov/radar/images/DS.p19r0/SI.ktbw/latest.gif > radar.gifand set it up as a crontab task... */5 * * * * ~/bin/weather-desktopand if you want to get fancy and have ImageMagick installed you can do all sorts of manipulation before displaying the desktop. A simple example.... the size of downloaded image is way to big for me and sits smack in the center of the desktop... I would like the image reduced and down in teh lower left corner instead....hmmm #!/bin/sh # Filename: weather-desktop # original desktop pict or solid color the same size as desktop origd=~/Documents/desktop.pict # change this.... wdir=~/Documents/desktop-pict/ # and this.... location of your download images # change into working dir where you download images, and point # Desktop Pref pane too cd $wdir # download the image as usual curl http://www.srh.noaa.gov/radar/images/DS.p19r0/SI.ktbw/latest.gif > radar.gif # combine the original desktop (in this case mine is a solid blue) # with the newly downloaded radar image, scaling to a width of # 300px and locating at position 31px from left and 550px from top composite -compose over -geometry 300x+31+550 radar.gif $origd latest.gif |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.14 seconds |
|