You are not logged in.
Hello everyone,
I am trying to make all my apps be in dark theme. On QT apps I have issues across the board, with qt5ct complaining about the QT_QPA_PLATFORMTHEME not being set (despite being set in my environmnent.d/qt5.conf file, as recommended by this post . However, it still isn't taken into account even after a reboot.
As for GTK apps I have better luck, although nemo-fileroller does not respect it. It was set with lxappearance and I'm really confused about this one.
Cheers,
Offline
environment.d files are not a shell and export is a shell construct, if you followed that ShitGPT generated garbage, it's wrong and you should instead follow the accepted response above it. ergo, get rid of the export and just keep QT_QPA_PLATFORMTHEME=qt5ct and also check for typos, you spelled environment.d wrong in your response here.
Last edited by V1del (2024-12-11 17:00:12)
Offline
environment.d files are not a shell and export is a shell construct, if you followed that ShitGPT generated garbage, it's wrong and you should instead follow the accepted response above it. ergo, get rid of the export and just keep QT_QPA_PLATFORMTHEME=qt5ct and also check for typos, you spelled environment.d wrong in your response here.
Whoops, didn't realise it was ChatGPT...
I did also follow the above answer, and it didn't work sadly
I put it in my ~/.zshenv which should work in theory. I can echo the env var just fine but qt5ct still complains about it
Offline
I put it in my ~/.zshenv which should work in theory.
Not if it's not parsed to start the session (predominantly whether zsh is used to start the session)
QT_QPA_PLATFORMTHEME=qt5ct qt5ctand post the actual output/complaint - in doubt link (please don't embed it) a screenshot
Offline
I put it in my ~/.zshenv which should work in theory.
Not if it's not parsed to start the session (predominantly whether zsh is used to start the session)
QT_QPA_PLATFORMTHEME=qt5ct qt5ctand post the actual output/complaint - in doubt link (please don't embed it) a screenshot
Thank you, that did it. I thought it was parsed automatically, but guess not. Sadly this didn't fix all my issues as I envisioned, as qt5ct is now using the proper theme, though apps are still in light mode by default.
Offline
qt5ct is now using the proper theme, though apps are still in light mode by default
What "apps", what "proper theme" and did you configure a dark palette?
Offline
qt5ct is now using the proper theme, though apps are still in light mode by default
What "apps", what "proper theme" and did you configure a dark palette?
The "apps" are for instance Kate, but also the nemo-fileroller and various random software that don't really offer theming but follow the system theme, like 1Password. They are all set to light theme by default.
I have set a dark theme for GTK (adwaita dark) through nwg-looks, and a QT theme (GTK2 darker) through qt5ct.
Offline
Kate runs on Qt6, you'll need and to configure qt6ct
As for GTK, try "GTK_THEME=Adwaita:dark nemo-fileroller" (this has turned into a complete, xdg-portal driven, mess and afaiu only the environment variable can reliably impact this outside gnome)
Offline
Kate runs on Qt6, you'll need and to configure qt6ct
As for GTK, try "GTK_THEME=Adwaita:dark nemo-fileroller" (this has turned into a complete, xdg-portal driven, mess and afaiu only the environment variable can reliably impact this outside gnome)
Is it possible to remediate to the xdg-portal mess ? I wouldn't be surprised if it causes issues. I'll try the environment vars, thanks a lot for the help ![]()
Offline
"Use gnome" - I cannot be bothered to investigate behind the latest gnome nonsense, but from what I understood this currently only works with the gnome-specific xdg-desktop-portal implementation and that only works on gnome.
But the environment variable should™ trump everything else and so if it works, that'd be what I'd got for - and as a matter of fact: do ![]()
Offline
"Use gnome" - I cannot be bothered to investigate behind the latest gnome nonsense, but from what I understood this currently only works with the gnome-specific xdg-desktop-portal implementation and that only works on gnome.
But the environment variable should™ trump everything else and so if it works, that'd be what I'd got for - and as a matter of fact: do
Sadly the env var did not work
when I tell apps to follow the system theme they still go light, and same for the file roller. It only works in dark mode when I start it from the shell, but not the dmenu. It's all very weird honestly, and something I would very much like to find a solution to ahah
Offline
Do you export the environement variable to dmenu or the script it invokes to run the input?
Offline
Do you export the environement variable to dmenu or the script it invokes to run the input?
I don't know how to do that to be fair, I assumed it would follow the system-wide variables ? It's set through hyprland, should I put them someplace else ?
Offline
You're using dmenu w/ Hyprland?
tr '\0' '\n' < /proc/$(pidof Hyprland)/environ
tr '\0' '\n' < /proc/$(pidof dmenu)/environwill print the environment seen by Hyprland resp. dmenu and dmenu is likely invoked by dmenu_run, https://wiki.archlinux.org/title/Dmenu
Offline
You're using dmenu w/ Hyprland?
tr '\0' '\n' < /proc/$(pidof Hyprland)/environ tr '\0' '\n' < /proc/$(pidof dmenu)/environwill print the environment seen by Hyprland resp. dmenu and dmenu is likely invoked by dmenu_run, https://wiki.archlinux.org/title/Dmenu
It seems like the dmenu can see the same environment vars. I'm using rofi dmenu if that changes anything.
Offline
It would change that "pidof dmenu" is likely empty?
Leaving aside "then why not wofi"
grep -z GTK_THEME /proc/$(pidof rofi)/environOffline
It would change that "pidof dmenu" is likely empty?
Leaving aside "then why not wofi"grep -z GTK_THEME /proc/$(pidof rofi)/environ
Yeah, I used "pidof rofi" with rofi opened lol, forgot to say that.
For the command you gave here is the output :
GTK_THEME=Adwaita:dark% And today for some godforsaken reason, after changing nothing, it works on more apps. The file roller is fixed, but the system theme is still detected as light for 1Password or Kate. I don't really mind for those apps in all honesty given that I can change the themes, but some others are more annoying. Like KDE Connect for instance, where it seems to follow the system theme.
Also I'm aware that rofi is suboptimal, but that's what I had setup when I was using a xorg WM. Is it worth it to switch to wofi ?
Offline
As mentioned, kate is Qt6 and will adhere to either plasma specific settings or a proper qt6ct setup. Not! qt5ct.
And there's no "system theme" - you're dealing w/ a variety of toolkits which all use their own theming system.
KDE connect and kate will likely adhere to the same settings, though.
1password seems gtk3, but maybe also just electron and there's https://1password.community/discussion/ … preference
Offline