Skip to content

Commit eb1bbee

Browse files
committed
wallpaper_utils: Update wallpaper string representation
1 parent 92bc81d commit eb1bbee

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/kde_material_you_colors/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def main():
366366

367367
if apply and wallpaper.source and stop_apply is False or first_run:
368368
if counter == 0:
369-
logging.info(f"{wallpaper.current}")
369+
logging.info(f"{wallpaper}")
370370
apply_themes.apply(config, wallpaper, light_mode_watcher.value)
371371
apply = False
372372

@@ -381,7 +381,7 @@ def main():
381381
if plugin_watcher.changed or config_watcher.changed:
382382
apply = False
383383
stop_apply = False
384-
logging.info(f"{wallpaper.current}")
384+
logging.info(f"{wallpaper}")
385385
apply_themes.apply(config, wallpaper, light_mode_watcher.value)
386386
counter = 0
387387

@@ -392,11 +392,11 @@ def main():
392392
counter = 0
393393

394394
if counter >= target_cycles and stop_apply is False:
395-
logging.info(f"{wallpaper.current}")
395+
logging.info(f"{wallpaper}")
396396
apply_themes.apply(config, wallpaper, light_mode_watcher.value)
397397
counter = 0
398398

399-
print("counter:", counter)
399+
# print("counter:", counter)
400400

401401
time.sleep(config.read("main_loop_delay"))
402402
first_run = False

src/kde_material_you_colors/utils/wallpaper_utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def __init__(self, config: Configs):
3030
self._error = None
3131
self.reload()
3232

33+
def __str__(self) -> str:
34+
return f"Wallpaper: {self._plugin} ({self._type}): {self._source}"
35+
3336
@staticmethod
3437
def validate_monitor(monitor) -> int:
3538
return math_utils.clip(monitor, 0, 999, 0)
@@ -79,9 +82,9 @@ def error(self):
7982
@property
8083
def current(self):
8184
o = {
82-
"source": self._plugin,
85+
"plugin": self._plugin,
8386
"type": self._type,
84-
"data": self._source,
87+
"source": self._source,
8588
"error": self._error,
8689
}
8790
return o

0 commit comments

Comments
 (0)