From c46c20856159aba67f07d07b07682eff508e282b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 2 Jan 2018 10:33:23 +1100 Subject: [PATCH] wallpaper: Remove duplicate code --- pywal/util.py | 2 +- pywal/wallpaper.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/pywal/util.py b/pywal/util.py index 6f9376a..28048ba 100644 --- a/pywal/util.py +++ b/pywal/util.py @@ -20,7 +20,7 @@ class Color: @property def rgb(self): """Convert a hex color to rgb.""" - return "%s,%s,%s" % (*hex_to_rgb(self.hex_color)) + return "%s,%s,%s" % (*hex_to_rgb(self.hex_color),) @property def xrgba(self): diff --git a/pywal/wallpaper.py b/pywal/wallpaper.py index 759dddf..3200d41 100644 --- a/pywal/wallpaper.py +++ b/pywal/wallpaper.py @@ -129,11 +129,8 @@ def change(img): elif OS == "Windows": set_win_wallpaper(img) - elif desktop: - set_desktop_wallpaper(desktop, img) - else: - set_wm_wallpaper(img) + set_desktop_wallpaper(desktop, img) print("wallpaper: Set the new wallpaper.")