Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 37d6823

Browse files
committed
??
1 parent 979b669 commit 37d6823

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pywal/wallpaper.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import subprocess
88
import urllib.parse
99

10-
import settings
11-
import util
10+
from .settings import HOME, OS, CACHE_DIR
11+
from . import util
1212

1313

1414
def get_desktop_env():
@@ -134,7 +134,7 @@ def set_desktop_wallpaper(desktop, img):
134134
def 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

0 commit comments

Comments
 (0)