You are not logged in.
I'm trying to set a dark theme to all my gtk3 applications, reading here I understood that I need to create a ~/.config/gtk-3.0/settings.ini file to customize gtk3 at the user level, so I created it and added these 3 lines:
[Settings]
gtk-theme-name = Adwaita:Dark
gtk-application-prefer-dark-theme = trueand then I ran:
gsettings set org.gnome.desktop.interface gtk-theme Adwaita:DarkHowever it doesn't work as I would like, it works only if I switch to a tty and manually start a new x session running startx but it doesn't work with my default x session that ligthdm loads for me when I log in, I already tried rebooting and it's the same, I also tried wrapping the theme name in quotes but it doesn't the issue persists
This is a little confusing to me because if I run:
gsettings get org.gnome.desktop.interface Adwaita:DarkI get the correct theme I'm setting in settings.ini: 'Adwaita:Dark'
So I feel I'm close but I'm lacking some pieces of information.
Last edited by Ghost-Order (2024-05-28 23:12:45)
Offline
The wiki says (I oversaw it multiple times when I had the same issue) :
Note: If not using the according XDG Desktop Portal, you might have to set the environment variable ADW_DISABLE_PORTAL=1 for theme set via GSettings to be picked up. See https://gitlab.gnome.org/GNOME/libadwai … 63f81011ef
Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...
Offline
In my case ADW_DISABLE_PORTAL=1 didn't helped but I found the solution.
First I need to found how to tell lightdm about my style config, reading the lightdm page there is precisely a section about my issue, basically I need a couple of files
~/.xprofile
~/.config/zsh/.zshenvThe env variables indicated here:
GTK_THEME=Adwaita:dark
GTK2_RC_FILES=/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc
QT_STYLE_OVERRIDE=Adwaita-Darkhave to be set in the .zshenv file and then inside ~/.xprofile I need to source it:
[ -f ~/.config/zsh/.zshenv ] && . ~/.config/zsh/.zshenvJust by doing this my gtk3 apps now respect the theme I set, which in this case is Adwaita:Dark
In the case of qt apps some of them (like pcmanfm-qt) respect the QT_STYLE_OVERRIDE=Adwaita-Dark env variable but some others don't like keepassxc and qbitorrent don't, I had to install adwaita-qt5-git and adwaita-qt6-git respectively and also in the case of keepassxc I had to manually go to view > theme > classic(platform-native) for it to apply the just installed theme.
Last edited by Ghost-Order (2024-05-28 23:12:29)
Offline