mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-10 07:58:12 +01:00
wallpaper: Remove duplicate code
This commit is contained in:
parent
296d3f54b9
commit
c46c208561
@ -20,7 +20,7 @@ class Color:
|
|||||||
@property
|
@property
|
||||||
def rgb(self):
|
def rgb(self):
|
||||||
"""Convert a hex color to rgb."""
|
"""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
|
@property
|
||||||
def xrgba(self):
|
def xrgba(self):
|
||||||
|
@ -129,11 +129,8 @@ def change(img):
|
|||||||
elif OS == "Windows":
|
elif OS == "Windows":
|
||||||
set_win_wallpaper(img)
|
set_win_wallpaper(img)
|
||||||
|
|
||||||
elif desktop:
|
|
||||||
set_desktop_wallpaper(desktop, img)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
set_wm_wallpaper(img)
|
set_desktop_wallpaper(desktop, img)
|
||||||
|
|
||||||
print("wallpaper: Set the new wallpaper.")
|
print("wallpaper: Set the new wallpaper.")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user