Thursday, 5 June 2008

Live Desktop

Further to the previous post which used ImageMagick to add live weather views to the desktop, this post extends the idea with a selection of webcam images, a local newspaper front page, and weather radar to create a real desktop window on the world.

#!/bin/bash

wallpapers="/usr/share/backgrounds/"
wallpaper="simple-ubuntu.png"
weather="http://www.met.ie/weathermaps/latest_radar.gif"
cam1="http://www.galway.net/galwayguide/webcam/cam05/current.jpg"
cam2="http://www.dublintraffic.com/Site0Camera10.jpg"
cam3="http://www.dublintraffic.com/Site0Camera21.jpg"
cam4="http://www.dublintraffic.com/Site0Camera44.jpg"
cam5="http://www.dublintraffic.com/Site0Camera79.jpg"
cam6="http://www.dublintraffic.com/Site0Camera41.jpg"
cam7="http://www.dublintraffic.com/Site0Camera47.jpg"

convert -page +0+0 $wallpapers$wallpaper -page +400+400 $weather -page +800+300 $cam1 -page +700+600 $cam2 -page +800+900 $cam3 -page +1400+300 $cam4 -page +1500+900 $cam5 -page +1200+700 $cam6 -page +1600+600 $cam7 -flatten $wallpapers/radar.jpg

Include more of that ImageMagick magic and you've got a real fun addition to your desktop world - something not possible under Windows Vista despite all its boasting.

radar

#!/bin/bash
# radar
# live desktop script

wallpapers="/usr/share/backgrounds/"
wallpaper="simple-ubuntu.png"
img1="http://www.galway.net/galwayguide/webcam/cam05/current.jpg"
cap1="1. Galway Harbour"
pos1="+800+300"
img2="http://www.dublintraffic.com/Site0Camera10.jpg"
cap2="2. Wolfe Tone Quay"
pos2="+700+600"
img3="http://www.dublintraffic.com/Site0Camera41.jpg"
cap3="3. Wellington Quay"
pos3="+800+900"
img4="http://www.dublintraffic.com/Site0Camera44.jpg"
cap4="4. Dame Street, Dublin"
img5="http://www.dublintraffic.com/Site0Camera79.jpg"
pos4="+1400+300"
cap5="5. Mad Cow, M50, Dublin"
pos5="+1500+900"
img6="http://www.dublintraffic.com/Site0Camera3.jpg"
cap6="6. O'Connell Street"
pos6="+1200+700"
img7="http://www.dublintraffic.com/Site0Camera21.jpg"
cap7="7. Dame Street, Dublin"
pos7="+1600+600"
img8="http://www.dublintraffic.com/Site0Camera85.jpg"
cap8="8. Naas Road, Dublin"
pos8="+350+800"
img9="http://www.met.ie/weathermaps/latest_radar.gif"
cap9="9. Weather Radar"
pos9="+400+400"
img10="http://www.met.ie/weathermaps/nat00_weather.png"
cap10="10. Weather"
pos10="+200+300"
img11="http://www.eveningecho.ie/pdf/front.pdf"
pos11="+50+800"

convert -quiet -caption "$cap1, %c %f" $img1 -background black +polaroid /tmp/img1.tif
convert -quiet -caption "$cap2, %c %f" $img2 -background black +polaroid /tmp/img2.tif
convert -quiet -caption "$cap3, %c %f" $img3 -background black +polaroid /tmp/img3.tif
convert -quiet -caption "$cap4, %c %f" $img4 -background black +polaroid /tmp/img4.tif
convert -quiet -caption "$cap5, %c %f" $img5 -background black +polaroid /tmp/img5.tif
convert -quiet -caption "$cap6, %c %f" $img6 -background black +polaroid /tmp/img6.tif
convert -quiet -caption "$cap7, %c %f" $img7 -background black +polaroid /tmp/img7.tif
convert -quiet -caption "$cap8, %c %f" $img8 -background black +polaroid /tmp/img8.tif
convert -quiet -caption "$cap9, %c %f" $img9 -background black +polaroid /tmp/img9.tif
convert -quiet -caption "$cap10, %c %f" $img10 -background black +polaroid /tmp/img10.tif

convert -quiet -scale 50% $img11 /tmp/img11.gif
convert -quiet /tmp/img11.gif -background black +polaroid /tmp/img11.tif

convert -quiet -page $pos11 /tmp/img11.tif -page $pos10 /tmp/img10.tif -page $pos8 /tmp/img8.tif -page $pos7 /tmp/img7.tif -page $pos6 /tmp/img6.tif -page $pos5 /tmp/img5.tif -page $pos4 /tmp/img4.tif -page $pos3 /tmp/img3.tif -page $pos2 /tmp/img2.tif -page $pos1 /tmp/img1.tif -page $pos9 /tmp/img9.tif -page +0+0 $wallpapers$wallpaper -reverse -flatten $wallpapers/radar.jpg


0 comments:

iantheteacher

Planet ILUG