Skip to content

Commit

Permalink
Revert "folder name and spacing update"
Browse files Browse the repository at this point in the history
  • Loading branch information
limhenry committed Apr 23, 2016
1 parent ab2b54d commit cb30e63
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 19 deletions.
1 change: 0 additions & 1 deletion script/output.txt

This file was deleted.

File renamed without changes.
30 changes: 12 additions & 18 deletions wallpaper-changer/indicator.py → wallpaper changer/indicator.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import signal
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('AppIndicator3', '0.1')
gi.require_version('Notify', '0.7')
from gi.repository import Gtk as gtk
from gi.repository import AppIndicator3 as appindicator
import json
Expand Down Expand Up @@ -31,27 +27,25 @@ def build_menu():
menu.show_all()
return menu


def quit(source):
gtk.main_quit()


def changewallpaper(source):
with open('data.json') as data_file:
data = json.load(data_file)
with open('data.json') as data_file:
data = json.load(data_file)

rand = randint(0,1510)
data = data[rand]
wallpaper = data["Image URL"]
url = "http://" + wallpaper
rand = randint(0,1510)
data = data[rand]
wallpaper = data["Image URL"]
url = "http://" + wallpaper

urllib.urlretrieve(url, "wallpaper.jpg")
urllib.urlretrieve(url, "wallpaper.jpg")

location = '"' + "file://" + os.path.dirname(os.path.realpath(__file__)) + "/wallpaper.jpg" + '"'
command = "gsettings set org.gnome.desktop.background picture-uri " + location
os.system(command)
notify.Notification.new("<b>Earth View Wallpaper Changer</b>", "Wallpaper changed successfully", None).show()
location = '"' + "file://" + os.path.dirname(os.path.realpath(__file__)) + "/wallpaper.jpg" + '"'
command = "gsettings set org.gnome.desktop.background picture-uri " + location
os.system(command)
notify.Notification.new("<b>Earth View Wallpaper Changer</b>", "Wallpaper changed successfully", None).show()

if __name__ == "__main__":
signal.signal(signal.SIGINT, signal.SIG_DFL)
main()
main()
File renamed without changes
Binary file removed wallpaper-changer/wallpaper.jpg
Binary file not shown.

0 comments on commit cb30e63

Please sign in to comment.