Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@
## Übersicht Widget to Earth View bacground

By Nicholas Maggio

## Edited repository
By David Brooks

I have changed the command of the original repo
In the old command, refresh did not cuase the random number to change
This new command uses BASH's random and so it is updated each time
the command is rerun/refreshed
Binary file modified earth-view.widget.zip
Binary file not shown.
11 changes: 10 additions & 1 deletion earth-view.widget/index.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# get random image from list of 100
command: "curl -so earth-view.widget/images/img.jpg earthview.withgoogle.com/images/wallpaper/"+ Math.floor(Math.random() * (101 - 1) + 1) + ".jpg"

# Command changed by David Brooks - https://github.com/djbrooks111
# In the old command, refresh did not cause the random number to change
# This new command uses BASH's random and so it is updated each time
# the command is rerun/refreshed

command: "num=$(($RANDOM % 100 + 1)); curl -so earth-view.widget/images/img.jpg earthview.withgoogle.com/images/wallpaper/${num}.jpg"

#command: "curl -so earth-view.widget/images/img.jpg earthview.withgoogle.com/images/wallpaper/"+ Math.floor(Math.random() * (101 - 1) + 1) + ".jpg"


# Set the refresh frequency (milliseconds).
refreshFrequency: 200000
Expand Down