varietywalls / variety

Wallpaper downloader and manager for Linux systems
http://peterlevi.com/variety
GNU General Public License v3.0
1.21k stars 146 forks source link

Add 'Auto' option to icon and set depending on dark mode system pref #721

Open fnune opened 1 month ago

fnune commented 1 month ago

This PR is a draft to add a PreferDarkModeListener to Variety that can have callbacks registered to it in order to notify parts of the app of whether the user prefers dark mode or light mode at an OS level.

It is currently only being used to set the icon to Dark or Light automatically. But it could be used to choose wallpapers of a certain tone if the user wants that.

:warning: I have not tested this PR yet and am posting it just to gauge interest. I will see if it works and productize it if people want this.

Would fix: https://github.com/varietywalls/variety/issues/722

fnune commented 1 month ago

Actually the intitial .get_property is working fine for me under Plasma 6 but I am not getting notified when the global theme changes. Might have to do something OS-specific. I'm not an experienced desktop app developer.