Last active
January 9, 2017 08:55
-
-
Save pashazz/84846bad449910c684245e5c141d8a3c to your computer and use it in GitHub Desktop.
patch -p1 /usr/lib/python3.6/site-packages/wpreddit/wallpaper.py wallpaper.py.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- wallpaper.py.old 2017-01-09 11:05:16.554035609 +0300 | |
+++ wallpaper.py 2017-01-09 11:34:56.456909197 +0300 | |
@@ -51,6 +51,15 @@ | |
os.system("xfconf-query -c xfce4-desktop -p " + prop + " -s 'true'") | |
elif de in ["lubuntu", "Lubuntu"]: | |
os.system("pcmanfm -w %s" % path) | |
+ elif de in ["/usr/share/xsessions/plasma"]: | |
+ files = os.listdir(config.walldir) | |
+ for file in files: | |
+ if re.search('wallpaper[0-9]+\.jpg', file) is not None: | |
+ os.remove(config.walldir + "/" + file) | |
+ randint = random.randint(0, 65535) | |
+ randpath = os.path.expanduser(config.walldir + "/wallpaper%s.jpg" % randint) | |
+ shutil.copyfile(path, randpath) | |
+ os.system("ksetwallpaper %s" % randpath) | |
else: | |
if config.setcmd == '': | |
print("Your DE could not be detected to set the wallpaper." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment