Debian 13 minimal - Dark Theme: Adwaita-dark

I used to have ‘Adwaita-dark’ working in my Debian 12 minimal Qubes. With my auto-generation script for Qubes, the Debian 13 minimal template won’t switch to ‘Adwaita-dark’ anymore.

What changed from Debian 12 to 13 about ‘Adwaita-dark’ and ‘GTK’ (packages and config)?

I’ve tried many packages and configs for days without success.
Here are the packages I currently have:

adwaita-icon-theme
libadwaita-1-0
gnome-shell-extension-user-theme
dconf-gsettings-backend
gnome-tweaks
gnome-control-center

I also test with:

gnome-themes-extra
gsettings-desktop-schemas
gnome-shell-extension-user-theme

Config files for GTK3 are set: settings.ini

[Settings]
gtk-font-name=Adwaita Sans 12
gtk-theme-name=Adwaita-dark
gtk-icon-theme-name=Adwaita
gtk-decoration-layout=menu:
gtk-application-prefer-dark-theme=1

[AdwStyleManager]
color-scheme=ADW_COLOR_SCHEME_PREFER_DARK

I have verified all gsettings:

gsettings get org.gnome.desktop.interface gtk-theme
'Adwaita-dark'

gsettings get org.gnome.desktop.wm.preferences theme
'Adwaita-dark'

gsettings get org.gnome.desktop.interface icon-theme
'Adwaita'

gsettings get org.gnome.desktop.interface color-scheme
'prefer-dark'

Nautilus is still light theme :see_no_evil:

I am looking for light (only mandatory packages) and scriptable solution (no manual UI config).
Anyone here, who has a working Debian 13 minimal dark theme?

1 Like

I haven’t worked on this yet, but will appreciate knowing the solution. The following looks promising wrt gtk-4:

where the simple solution is:

Add

GTK_THEME=Adwaita-dark

to /etc/environment

1 Like

Personally, my salt state for setting up darkmode does two things:

  1. It creates /etc/profile.d/darkmode.sh:
        #!/bin/bash
        export QT_QPA_PLATFORMTHEME=gtk2
        export QT_STYLE_OVERRIDE=Adwaita-dark
        export GTK_THEME=Adwaita:dark
  1. It creates /etc/environment:
    QT_QPA_PLATFORMTHEME=gtk2

But i think that the answer of @ephile above mine is also valid.

Edit: I use minimal templates for setting up my qubes, and I never had to install an additional package.

Another note: I know I have redundancy in these two things I do in my salt states, but this made it work when I tried to set it up and it wasnt a priority for me which of the things are needed and which are not.

2 Likes

tested and failed, but thanks to @andreasglashauser I tried the following and it worked (dark:mode thunar in debian-13-minimal):

echo "GTK_THEME=Adwaita:dark" >> /etc/environment
3 Likes

I did some progress: Nautilus is almost perfect.

Still some icon issue.

with adwaita-icon-theme and gnome-shell-extension-user-theme you get the icons

but there are still some minor but odd textbox format issue in some text elements:

as a reference Debian 13 (default, not minimal template)

  • proper left “Files” bar coloring
  • big icons (when folder is empty)
  • proper textbox

For QT applications, I benchmarked KeePassXC
Here, you need to set

QT_STYLE_OVERRIDE=Adwaita-dark
QT_QPA_PLATFORMTHEME=qt5ct

QT_QPA_PLATFORMTHEME=gtk2 does not work anymore for Debian 13 (minimal)

2 Likes

Thanks to the above posts I’m able to get reliable dark mode on debian-13-minimal without installing any additional packages, only these probably partly redundant edits in /etc:

echo 'GTK_THEME=Adwaita:dark
QT_QPA_PLATFORMTHEME=qt5ct
' | qvm-run -p -u root "$template" 'cat >> /etc/environment'
 
echo '#!/bin/bash
 
export GTK_THEME=Adwaita:dark
export QT_QPA_PLATFORMTHEME=qt5ct
export QT_STYLE_OVERRIDE=Adwaita-dark
' |  qvm-run -p -u root "$template" 'cat > /etc/profile.d/darkmode.sh'

No gsettings set <...> needed so far this time.

The one minor hitch is that icons are kind-of bright. I was thinking maybe adwaita-icon-theme does not include dark mode icons. But according to the repo:

The color of the icon set is defined at runtime by gtk. Every single icon from the set is actually embedded inside an xml container that has a stylesheet overriding the colors.

So perhaps I could be seeing dark mode Adwaita icons with a little more work. Does someone know what tweaks are required for darker icons? Or alternatively, suggest a good dark icon theme available in the standard debian 13 repo?

1 Like