stylix
stylix copied to clipboard
kde: apply Qt theme on non-KDE systems
Fixes plasma theme not applying on non-KDE desktop environments and on window managers. See #142.
Here's Dolphin, fully themed under GNOME:
The missing file previews are because I didn't install the thumbnail service, nothing to do with this PR.
I didn't have much luck getting this to work with non-KDE Qt apps. Is it meant to theme those too?
It worked with PCManFM-Qt when I tried it, so it works with some. What apps was it not working for?
You're right, it works straight away with PCManFM. I just tried some XFCE apps and they work, too.
I was trying it with KeepassXC before, which does include its own theming menu, so it may just be that KeepassXC is doing its own thing even when I set it to use the system theme.
If you set keepassxc to use the "Classic (platform native)" theme it should follow your system theme
I tried that, but it kept a default white theme for some reason.
Side note: This PR adds around 250 MiB downloaded and 800 MiB unpacked on a GNOME system, due to the dependency on plasma-workspace
. Although it's not small, I think that's a reasonable price to pay for consistent theming across a number of different apps.
I tried that, but it kept a default white theme for some reason.
Interesting - works fine on my machine. I think there'll always be some strange edge cases with how weird Qt theming is in general - probably best to deal with these cases as they come up.
Side note: This PR adds around 250 MiB downloaded and 800 MiB unpacked on a GNOME system, due to the dependency on
plasma-workspace
. Although it's not small, I think that's a reasonable price to pay for consistent theming across a number of different apps.
We could try and remove the plasma-workspace dependency if it becomes a problem that people complain about by trying to write to kdeglobals
directly, but I doubt it'll be an issue.
In it's current iteration, this PR doesn't seem to work if home-manager.useUserPackages = true
is set. Not sure why, will look into it when I have time.
I've edited the PR to replace the dependency on plasma-workspace
with just directly writing to kdeglobals
instead.
plasma-workspace
taking 800 Mib.
It should not be an issue but using kvantum (kvconfig) and qt5ct/qt6ct themes templates to generate and set them.
My Templates does contain a lot of pywal based templates but they are not in moustache
format (they are in somthing similar).
Rn m in mid of transition Arch->Nix
porting them is not possible rn for me.
Dolphin (and I imagine other programs too) doesn't get correctly themed:
Dolphin (and I imagine other programs too) doesn't get correctly themed: Dolphin is being correctly themed on my system with my branch. Can you show me some more of your config?
@Jackaed https://github.com/dzervas/dotfiles/tree/f2b784c3ef018b7693861140d8250bbbef3fdeb9
(ignore the flake lock that points to stylix, I did nix flake update --override-input stylix github:Jackaed/stylix
locally)
only the nix
folder is of interest - anything else isn't used for nixos
the effective machine is laptop
and the files of most interest should be system/display.nix
, system/theme.nix
and home/desktop/sway.nix
The issue is that this did not previously have qt6 support, which it now does. You were using dolphin qt6 because you were using kdePackages.dolphin
instead of just dolphin
.
Okay, after a lot of meddling, this now works with Qt6 everything (at least on my system, please test independently).
Here is dolphin qt5 and qt6 both being themed correctly under my branch, side by side. Qt6 on the left, Qt5 on the right.
Same goes for okular:
OMG YES!
EDIT: wow even the icons are magically fixed. did you do something about it?
EDIT: wow even the icons are magically fixed. did you do something about it?
Yeah icons were a pain in the arse, installing kdePackages.full
fixed them (note this doesn't install all of kde, just all of the qt6 dependency and extension libraries. Not sure what individual package fixed them, but glad it's working. Just need to try and get this merged now.