Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: use a library for handling wallpaper #19

Open
bharadwaj-raju opened this issue Jul 7, 2016 · 8 comments
Open

Suggestion: use a library for handling wallpaper #19

bharadwaj-raju opened this issue Jul 7, 2016 · 8 comments

Comments

@bharadwaj-raju
Copy link

bharadwaj-raju commented Jul 7, 2016

There is a library, libdesktop, that you can use to ease development, maintenance and add support for more platforms.

Install:

pip install libdesktop

And then it's just:

import libdesktop

libdesktop.set_desktop_wallpaper(image)

Also:

It even has a add_to_system_startup() function, but probably you'll not want it since you want users to handle that through cron/Task Scheduler.

@remggo
Copy link
Contributor

remggo commented Jul 7, 2016

I will look into it at the weekend. Sounds very promising to clean up code 👍

@remggo
Copy link
Contributor

remggo commented Jul 10, 2016

Does this Library only work with Python 3?
At the moment this Project works with Python 2 and 3, it would be unnecessary to add an library and losing support of Python2 without an functionality increase other than 'the code looks a little bit cleaner'

@bharadwaj-raju
Copy link
Author

No, it works with 2 and 3.

(NOTE: Python 2 support is very recently finished and uploaded, please update)

@dolohow
Copy link
Contributor

dolohow commented Sep 3, 2016

Missing disclaimer:
bharadwaj-raju is the owner of the library

To be honest, I see no purpose in using library which is that new and it does not have a lot of activity, but keep up the good work!

@bharadwaj-raju
Copy link
Author

@dolohow Well, I sure missed that :)

Anyway, if you don't like a library, here is the essence: https://gist.github.com/bharadwaj-raju/46ef4c76e4e72ae618f83a22bfde09bf

Then you can add that file (wallpaper.py) and call wallpaper.set().

@remggo
Copy link
Contributor

remggo commented Nov 4, 2016

@dolohow But maybe the use of libdesktop makes it possible to use this Script on a broader range of DEs. As far as I can tell this script only works with KDE, Gnome, Lxde, Xfce4 and Mate; whereas libdesktop supports all kinds of obscure DEs see @bharadwaj-raju his code for wallpaper.set()

@bharadwaj-raju
Copy link
Author

@remggo Now, using the Gist above, you can paste the contents of said Gist into a file, import and call set()

@remggo
Copy link
Contributor

remggo commented Nov 4, 2016

See PR #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants