Skip to content

Commit

Permalink
Merge pull request #1 from Gremious/master
Browse files Browse the repository at this point in the history
Windows wallpaper dylanaraps#684
  • Loading branch information
robwaz authored Oct 22, 2023
2 parents 91a8b3b + 22c1125 commit 2f1a9b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pywal/wallpaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ def set_win_wallpaper(img):
if "x86" in os.environ["PROGRAMFILES"]:
ctypes.windll.user32.SystemParametersInfoW(20, 0, img, 3)
else:
ctypes.windll.user32.SystemParametersInfoA(20, 0, img, 3)
# 'W' funcitons take uniqcode strings,
# while 'A' functions take UTF-8 bytestrings.
# (Python 3 strings are Unicode by default.)
ctypes.windll.user32.SystemParametersInfoA(20, 0, str.encode(img), 3)


def change(img):
Expand Down

0 comments on commit 2f1a9b8

Please sign in to comment.