superpaper icon indicating copy to clipboard operation
superpaper copied to clipboard

Gnome DEs: set the wallpaper on the dark mode

Open matias49 opened this issue 2 years ago • 2 comments

Following the issue #119, I looked on how to set correctly the wallpaper when the dark mode is applied. While the first try I did was using gsetting to get the current color-scheme, the dark style preference documentation recommends to request its value by the dbus org.freedesktop.portal.Desktop

Documentation of the dbus variable Documentation of the gsetting color-scheme variable

Currently tested and work on Fedora 36, Gnome 42.2 Xorg and Wayland. Open to any suggestion, as I didn't had any knowledge on dbus and gsettings.

(Original issue, solution and workaround by amsteel)

matias49 avatar Jun 28 '22 15:06 matias49

Been using these changes for about a month, works perfectly fine. It sets the wallpaper on the mode selected, and the other one becomes blank. It may be best if it sets both, so it's not jarring when switching between modes; but there might be performance issues I don't know about with that, and regardless it will eventually correct itself if using a slideshow. I always stay on dark mode, so I've had no problems. Tested on Fedora 36 + GNOME 42.

Commenter25 avatar Aug 10 '22 18:08 Commenter25

I don't know of any performance issue if set to both modes at the same time. I noticed the background can be blank if the color mode changes (especially visible when booting), because the wallpaper is not set on the other.

So I made the change to set the wallpaper to both gnome-settings at the same time, and reverted the dbus import to kde as it's the only one using it

matias49 avatar Sep 30 '22 07:09 matias49