This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 77import subprocess
88import urllib .parse
99
10- import settings
11- import util
10+ from . settings import HOME , OS , CACHE_DIR
11+ from . import util
1212
1313
1414def get_desktop_env ():
@@ -134,7 +134,7 @@ def set_desktop_wallpaper(desktop, img):
134134def set_mac_wallpaper (img ):
135135 """Set the wallpaper on macOS."""
136136 db_file = "Library/Application Support/Dock/desktoppicture.db"
137- db_path = os .path .join (settings . HOME , db_file )
137+ db_path = os .path .join (HOME , db_file )
138138 img_dir , _ = os .path .split (img )
139139
140140 # Clear the existing picture data and write the image paths
@@ -173,19 +173,19 @@ def change(img):
173173
174174 desktop = get_desktop_env ()
175175
176- if settings . OS == "Darwin" :
176+ if OS == "Darwin" :
177177 set_mac_wallpaper (img )
178178
179- elif settings . OS == "Windows" :
179+ elif OS == "Windows" :
180180 set_win_wallpaper (img )
181181
182182 else :
183183 set_desktop_wallpaper (desktop , img )
184184
185- logging .info ("Desktop is " + desktop )
185+ logging .info ("Set the new wallpaper." )
186186
187187
188- def get (cache_dir = settings . CACHE_DIR ):
188+ def get (cache_dir = CACHE_DIR ):
189189 """Get the current wallpaper."""
190190 current_wall = os .path .join (cache_dir , "wal" )
191191
You can’t perform that action at this time.
0 commit comments