Works fine over here! Am I misunderstanding the problem?
To have the theme honored, QT_STYLE_OVERRIDE kvantum-dark
must be exported as an environment variable.
Speaking of the environment variables, I do not think setting them in .profile
is good enough. For me, this file is not getting sourced. See what I mean:
We have in our Fish config a call to source ~/.fish_profile
:
## Environment setup
# Apply .profile: use this to put fish compatible .profile stuff in
if test -f ~/.fish_profile
source ~/.fish_profile
end
Using this file works fine, if you convert these to Fish syntax.
set -x MOZ_ENABLE_WAYLAND 1
set -x MOZ_WAYLAND_USE_VAAPI 1
set -x MOZ_DBUS_REMOTE 1
set -x GDK_BACKEND wayland
set -x XDG_CURRENT_DESKTOP hyprland
set -x XDG_SESSION_DESKTOP hyprland
set -x XDG_SESSION_TYPE wayland
set -x EDITOR /usr/bin/micro
set -x BROWSER firedragon
set -x TERM xterm-256color
set -x MAIL thunderbird
set -x QT_QPA_PLATFORMTHEME qt5ct
set -x GTK2_RC_FILES $HOME/.ägtkrc-2.0
set -x QT_STYLE_OVERRIDE kvantum-dark
But this is still not good enough, because for some of these environment variables to work correctly they must be exported before Hyprland is started.
Take Garuda Welcome for example. If I launch from the terminal, the theme is honored because the QT_STYLE_OVERRIDE
value has been exported in the Fish profile. If I launch from Wofi, the theme is not preserved because that file wasn’t sourced when Hyprland (and all the stuff in its config) started.
Here they are side-by-side, from the terminal on the left and from Wofi on the right:
The correct way to set these variables, or at least a very good way, is to set up a wrapper script as described in the Greetd wiki:
How to set XDG_SESSION_TYPE=wayland/…?
While you could set this in your
.profile
, the recommended way to handle this is with a wrapper script. Doing it this way allows you to start multiple login environments without having weird env vars mess with things.
- /usr/local/bin/sway-run (should be made executable)
#!/bin/sh # Session export XDG_SESSION_TYPE=wayland export XDG_SESSION_DESKTOP=sway export XDG_CURRENT_DESKTOP=sway # Wayland stuff export MOZ_ENABLE_WAYLAND=1 export QT_QPA_PLATFORM=wayland export SDL_VIDEODRIVER=wayland export _JAVA_AWT_WM_NONREPARENTING=1 exec sway $@ # # If you use systemd and want sway output to go to the journal, use this # instead of the `exec sway $@` above: # # exec systemd-cat --identifier=sway sway $@ #
Simply use
sway-run
instead ofsway
to log in.
Of course we are using SDDM instead of Greetd, so I am not sure where we would put the wrapper script–but I am sure there is a way, right?
Since I brought it up: I don’t really love SDDM as a display manager for this spin. It just seems like it has some problems. Have you guys been able to log out, for example? SDDM doesn’t recover when I have tried this–the screen just goes black and I have to kick over to a TTY.
What do you guys think of switching to Greetd? Is it too plain?