Add support for gnome 42 dark mode#91
Add support for gnome 42 dark mode#91wmcmillian-coalmarch wants to merge 2 commits intoadi1090x:masterfrom
Conversation
|
Looks good, I would love to see it merged |
|
+1 for this. With more people using dark mode and Gnome dedicating a setting to it, this is a really good addition! |
|
Works but creates a file with $1 as name on Ubuntu 22.04. Removing the |
|
Sorry for being way too late. Nice PR, can you resolve conflicts and reproduce it? |
|
@wmcmillian-coalmarch Are you able to resolve the conflict? |
|
I had the same issue on GNOME 42 (X11) running on Ubuntu 22.04. gsettings set org.gnome.desktop.background picture-uri 'file:///usr/share/dynamic-wallpaper/images/room/9.jpg'…it did not work and gave no error. 🕵️ Root cause:GNOME uses the key We can check the current color scheme with: gsettings get org.gnome.desktop.interface color-schemeIf it returns gsettings set org.gnome.desktop.background picture-uri-dark 'file:///usr/share/dynamic-wallpaper/images/room/9.jpg'✅ Suggestion: Handle both themes in set_gnome() function, something likeset_gnome() {
THEME_MODE=$(gsettings get org.gnome.desktop.interface color-scheme)
if [[ "$THEME_MODE" == "'prefer-dark'" ]]; then
gsettings set org.gnome.desktop.background picture-uri-dark "file:///$1"
else
gsettings set org.gnome.desktop.background picture-uri "file:///$1"
fi
gsettings set org.gnome.desktop.screensaver picture-uri "file:///$1"
}
---
Hope this helps others who run into the same issue.
Great project, by the way! 👏
Cheers from Brazil 🇧🇷! |
This adds support for gnome 42's new dark mode. So that the wall paper changes even if it is in dark mode.