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
1=== removed file 'earthwallpaper.sh'
2--- earthwallpaper.sh 2010-06-15 02:08:12 +0000
3+++ earthwallpaper.sh 1970-01-01 00:00:00 +0000
4@@ -1,21 +0,0 @@
5-#!/bin/bash
6-
7-# Copyright (C) 2010 Thomas Swartz
8-
9-# This program comes with ABSOLUTELY NO WARRANTY; for details see Section 1 of Script Licence.txt
10-# This is free software, and you are welcome to redistribute it under certain conditions;
11-# for details see Section 2 of Script License.txt.
12-
13-cd ~/.gnome2/
14-while [[ 1 ]]; do
15- COUNTER=0
16- while [[ COUNTER=$[ $COUNTER + 1 ] -lt 60 ]]; do
17- wget http://www.opentopia.com/images/cams/world_sunlight_map_rectangular.jpg -O world.jpg
18- if [[ $(file world.jpg | grep JPEG) ]]; then
19- mv world.jpg world_sunlight_Wallpaper.jpg
20- break
21- fi
22- sleep 5
23- done
24- sleep 300
25-done
26
27=== renamed file 'earthwallpaper.sh_new' => 'earthwallpaper.sh'
28--- earthwallpaper.sh_new 2010-06-07 04:37:42 +0000
29+++ earthwallpaper.sh 2010-07-13 17:21:42 +0000
30@@ -6,20 +6,17 @@
31 WAIT='60s'
32 FILEPATH='http://www.opentopia.com/images/cams/world_sunlight_map_rectangular.jpg'
33
34-function clean_up
35+clean_up()
36 {
37 gconftool-2 --set --type string '/desktop/gnome/background/picture_filename' "$ORIGINAL"
38 rm -f "$DOWNLOAD" "$SUNMAP"
39 exit $1
40 }
41
42-trap clean_up SIGHUP SIGINT SIGTERM
43+trap clean_up SIGHUP SIGINT SIGTERM EXIT
44
45-DOWNLOAD="$(mktemp --quiet)"
46-SUNMAP="$(mktemp --quiet)"
47-ORIGINAL="$(gconftool-2 --get '/desktop/gnome/background/picture_filename')"
48-gconftool-2 --set --type string '/desktop/gnome/background/picture_filename' "$SUNMAP"
49-while true; do
50+update_sunmap()
51+{
52 echo -n "Downloading new sunmap..."
53 wget --quiet "$FILEPATH" -O "$DOWNLOAD"
54 echo " done."
55@@ -29,4 +26,14 @@
56 rm "$DOWNLOAD"
57 fi
58 sleep "$WAIT"
59+}
60+
61+DOWNLOAD="$(mktemp --quiet)"
62+SUNMAP="$(mktemp --quiet)"
63+ORIGINAL="$(gconftool-2 --get '/desktop/gnome/background/picture_filename')"
64+gconftool-2 --set --type string '/desktop/gnome/background/picture_filename' "$SUNMAP"
65+
66+while true; do
67+ update_sunmap &
68+ wait
69 done

Subscribers

People subscribed via source and target branches

to all changes: