Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
minor changes
  • Loading branch information
anantdark committed Jun 13, 2023
1 parent a1ea989 commit 21ef02d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bin/main.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# from gi.repository import Gio
from gi.repository import Gio
import urllib.request
from bs4 import BeautifulSoup
import os
# import gi
import gi
import datetime
import subprocess
import time
import random
# gi.require_version('Gio', '2.0')
gi.require_version('Gio', '2.0')

###################### TRYING TO IMPLEMENT SCHEDULING########################
# subprocess.run(["xhost", "+SI:localuser:{}".format(os.getlogin())])
Expand All @@ -18,14 +18,14 @@
def set_wallpaper(filepath):
try:
command = ['gsettings', 'set', 'org.gnome.desktop.background', 'picture-uri', f'file://{filepath}']
command1 = ['gsettings', 'set', 'org.gnome.desktop.background', 'picture-uri', f'file://{filepath}']
command1 = ['gsettings', 'set', 'org.gnome.desktop.background', 'picture-uri-dark', f'file://{filepath}']
subprocess.run(command)
subprocess.run(command1)
except Exception as e:
print(e)
# gsettings = Gio.Settings.new('org.gnome.desktop.background')
# gsettings.set_string('picture-uri', f'file://{filepath}')
# gsettings.apply()
gsettings = Gio.Settings.new('org.gnome.desktop.background')
gsettings.set_string('picture-uri', f'file://{filepath}')
gsettings.apply()

def change_wallpaper(day):
while True:
Expand Down

0 comments on commit 21ef02d

Please sign in to comment.