Dark mode not work at all for gtk4/libadwaita applications
Hello,
I tried way too many possible things to fix out dark mode for libadwaita/gtk4 but it still using light variant.
Any assistance here ?
Regards.

On right is legacy app (gnome-tweaks with gtk3) on the left is gnome-settings (libadwaita)
Switching between Standard and Dark mode doesn't do, nothing (until i delete Graphite theme from ~/.themes)
Some ugly workaround was to remove gtk.css: symbolic link to /home/rosen/.themes/Graphite-Light-nord/gtk-4.0/gtk.css and link it to the dark ones, but now light mode not work at all. Is it there any consistent way to make them both work ?
Nope since gnome team removed support for custom themes, dark mode can not switch, because link gtk4 theme to config folder is not a perfect fix for this
Nope since gnome team removed support for custom themes, dark mode can not switch, because link gtk4 theme to config folder is not a perfect fix for this
Is there any mod or patch for gnome that changes the "dark mode" function? 🙏🏻
Nope since gnome team removed support for custom themes, dark mode can not switch, because link gtk4 theme to config folder is not a perfect fix for this
I personally use CSS import directive to import the theme's gtk.css into my local css : @import url("/home/zr/.themes/Graphite-blue-Dark-compact-nord/gtk-4.0/gtk.css"); My theme is inside .themes 'couse flatpak cant read global path. It doesn't fix the issue about changing theme variant on the fly but it is mutch easier than symlinking and you can also have custom css in your ~/.config/gtk-4.0/gtk.css
I personally use CSS import directive to import the theme's gtk.css into my local css : @import url("/home/zr/.themes/Graphite-blue-Dark-compact-nord/gtk-4.0/gtk.css");
Could you please elaborate a bit further? In which css file to you use the import directive?
I personally use CSS import directive to import the theme's gtk.css into my local css : @import url("/home/zr/.themes/Graphite-blue-Dark-compact-nord/gtk-4.0/gtk.css");
Could you please elaborate a bit further? In which css file to you use the import directive?
Gtk reads gtk.css from its config directories , thus ~/.config/gtk-4.0/gtk.css (For Gtk4). So instead of symlinking themes' gtk.css in the gtk4 config directory I just import the themes' gtk.css into the beginning of the config dir gtk.css file . But that is in the past. Now I just use a patched libadwaita that supports theming ( https://aur.archlinux.org/packages/libadwaita-without-adwaita-git ). As for flatpak I just use the GTK_THEME env variable, since I have no idea how to build "Gnome Platform" runtime.
-
Install night theme switcher Extension.
-
Set a Manual Schedule & Keyboard Shortcut
-
Rename gtk.css from light theme to gtk-light.css
-
Rename gtk.css from dark theme to gtk-dark.css
-
Copy & Paste both files in the $HOME/.config/gtk-4.0/ folder
-
Edit Command section Sunrise ->
gsettings set org.gnome.desktop.interface gtk-theme 'Graphite-blue-nord'; gsettings set org.gnome.desktop.interface icon-theme 'Tela'; ln -fs $HOME/.config/gtk-4.0/gtk-light.css $HOME/.config/gtk-4.0/gtk.cssSunset ->
gsettings set org.gnome.desktop.interface gtk-theme 'Graphite-blue-Dark-nord'; gsettings set org.gnome.desktop.interface icon-theme 'Tela'; ln -fs $HOME/.config/gtk-4.0/gtk-darks.css $HOME/.config/gtk-4.0/gtk.css -
Replace GTK & Icon Theme name to your preferred Themes in the above command