Merge lp:~joshbrown/codemonkey/earthwallpaper into lp:codemonkey

Proposed by Josh Brown
Status: Merged
Merged at revision: 42
Proposed branch: lp:~joshbrown/codemonkey/earthwallpaper
Merge into: lp:codemonkey
Diff against target: 69 lines (+14/-7)
1 file modified
earthwallpaper.sh (+14/-7)
To merge this branch: bzr merge lp:~joshbrown/codemonkey/earthwallpaper
Reviewer Review Type Date Requested Status
Josh Brown Approve
Review via email: mp+29728@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Josh Brown (joshbrown) :
review: Needs Fixing
Revision history for this message
Josh Brown (joshbrown) wrote :

Bug #589355 must be solved before this merge takes place.

Revision history for this message
Josh Brown (joshbrown) wrote :

Revision 41 fixes bug #589355. This branch is now ready for merging.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed file 'earthwallpaper.sh'
--- earthwallpaper.sh 2010-06-15 02:08:12 +0000
+++ earthwallpaper.sh 1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
1#!/bin/bash
2
3# Copyright (C) 2010 Thomas Swartz
4
5# This program comes with ABSOLUTELY NO WARRANTY; for details see Section 1 of Script Licence.txt
6# This is free software, and you are welcome to redistribute it under certain conditions;
7# for details see Section 2 of Script License.txt.
8
9cd ~/.gnome2/
10while [[ 1 ]]; do
11 COUNTER=0
12 while [[ COUNTER=$[ $COUNTER + 1 ] -lt 60 ]]; do
13 wget http://www.opentopia.com/images/cams/world_sunlight_map_rectangular.jpg -O world.jpg
14 if [[ $(file world.jpg | grep JPEG) ]]; then
15 mv world.jpg world_sunlight_Wallpaper.jpg
16 break
17 fi
18 sleep 5
19 done
20 sleep 300
21done
220
=== renamed file 'earthwallpaper.sh_new' => 'earthwallpaper.sh'
--- earthwallpaper.sh_new 2010-06-07 04:37:42 +0000
+++ earthwallpaper.sh 2010-07-13 17:21:42 +0000
@@ -6,20 +6,17 @@
6WAIT='60s'6WAIT='60s'
7FILEPATH='http://www.opentopia.com/images/cams/world_sunlight_map_rectangular.jpg'7FILEPATH='http://www.opentopia.com/images/cams/world_sunlight_map_rectangular.jpg'
88
9function clean_up9clean_up()
10{10{
11 gconftool-2 --set --type string '/desktop/gnome/background/picture_filename' "$ORIGINAL"11 gconftool-2 --set --type string '/desktop/gnome/background/picture_filename' "$ORIGINAL"
12 rm -f "$DOWNLOAD" "$SUNMAP"12 rm -f "$DOWNLOAD" "$SUNMAP"
13 exit $113 exit $1
14}14}
1515
16trap clean_up SIGHUP SIGINT SIGTERM16trap clean_up SIGHUP SIGINT SIGTERM EXIT
1717
18DOWNLOAD="$(mktemp --quiet)"18update_sunmap()
19SUNMAP="$(mktemp --quiet)"19{
20ORIGINAL="$(gconftool-2 --get '/desktop/gnome/background/picture_filename')"
21gconftool-2 --set --type string '/desktop/gnome/background/picture_filename' "$SUNMAP"
22while true; do
23 echo -n "Downloading new sunmap..."20 echo -n "Downloading new sunmap..."
24 wget --quiet "$FILEPATH" -O "$DOWNLOAD"21 wget --quiet "$FILEPATH" -O "$DOWNLOAD"
25 echo " done."22 echo " done."
@@ -29,4 +26,14 @@
29 rm "$DOWNLOAD"26 rm "$DOWNLOAD"
30 fi27 fi
31 sleep "$WAIT"28 sleep "$WAIT"
29}
30
31DOWNLOAD="$(mktemp --quiet)"
32SUNMAP="$(mktemp --quiet)"
33ORIGINAL="$(gconftool-2 --get '/desktop/gnome/background/picture_filename')"
34gconftool-2 --set --type string '/desktop/gnome/background/picture_filename' "$SUNMAP"
35
36while true; do
37 update_sunmap &
38 wait
32done39done

Subscribers

People subscribed via source and target branches

to all changes: