sindresorhus / wallpaper

Manage the desktop wallpaper
MIT License
1.05k stars 92 forks source link

Rewrite the Linux part #43

Closed deather closed 5 years ago

deather commented 6 years ago

This PR is in response of issue #42

I purpose you a new file organization for manage the multiple background manager on Linux. I'm using nitrogen so for me it is working. It would be cool if some people could test before merge.

What is it changed ?

setAvailableApps iterate over all manager and test if they are available, if it is they are stored set method just call the set method of each available background managers get method is more difficult to write, due to multiple managers. I use a strategy consisting of count the apparition of a file, and the most used will be return.

The final point is personnal, I think it is the more discutable. I'm ok to debate on this point. I hope this work can help.

Thanks for reading.

sindresorhus commented 5 years ago

@deather Sorry about the long delay. I've had too many PRs to review. This is looking great! It's a much better and more maintainable way to structure it.

sindresorhus commented 5 years ago

get method is more difficult to write, due to multiple managers. I use a strategy consisting of count the apparition of a file, and the most used will be return.

Good idea! I like it.

sindresorhus commented 5 years ago

This is looking great now. Thank you so much for improving this, @deather 🙌

sindresorhus commented 5 years ago

@deather Would you be interested in joining the project as a maintainer?

deather commented 5 years ago

@sindresorhus It will be cool, you can rely on me for this project :smile: