A Qt6/Qt5 platform theme using the KDE Color Scheme format, meant to be easily configurable.
- An easy config in JSON
- Works with Qt5 & Qt6 on the same config
- Works with KDE apps
- Doesn't freeze the Plasma XDG Desktop Portal
First add the input to your flake.
qtengine = {
url = "github:kossLAN/qtengine";
inputs.nixpkgs.follows = "nixpkgs";
};Then use the provided NixOS module.
imports = [inputs.qtengine.nixosModules.default];
# Add your desired theme to your system packages
environment.systemPackages = with pkgs.kdePackages; [
breeze
breeze.qt5 # Needed if you want Qt5 support.
breeze-icons
];
programs.qtengine = {
enable = true;
config = {
theme = {
colorScheme = "${pkgs.kdePackages.breeze}/share/color-schemes/BreezeDark.colors";
iconTheme = "breeze-dark";
style = "breeze";
font = {
family = "<font name>";
size = 11;
weight = -1;
};
fontFixed = {
family = "<font name>";
size = 11;
weight = -1;
};
};
misc = {
singleClickActivate = false;
menusHaveIcons = true;
shortcutsForContextMenus = true;
};
};
};Note
A restart of your DE/WM may be required for changes to take effect.
First install the AUR package.
yay -S qtengine
# yay -S qtengine-gitWarning
These packages are unofficial and community-maintained.
Then copy the example config from /etc/qtengine/config.example.json to ~/.config/qtengine/config.json. Additionally, it can be sourced from a folder in your XDG_CONFIG_DIRS, or by using the QTENGINE_CONFIG environment variable.
Finally set the environment variable QT_QPA_PLATFORMTHEME to qtengine.
First you'll need the following Qt6 dependencies
required: extra-cmake-modules qtbase kconfig kcolorscheme kiconthemes
optional: qtdeclarative
If you want Qt5 support you'll also need
required: qtbase kconfig kconfigwidgets kiconthemes
optional: qtdeclarative qtquickcontrols2
Then build the project
cmake -DCMAKE_BUILD_TYPE:STRING=Release -B build
# OPTIONAL: if you don't want to build with Qt5 support
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_QT5=OFF -B build
cmake --build build
cmake --install build
# OPTIONAL: or you can just use the Justfile if you have just
just build
just installThen write a config at ~/.config/qtengine/config.json, additionally it can be sourced from a folder in your XDG_CONFIG_DIRS, or by using the QTENGINE_CONFIG environment variable.
{
"theme": {
"colorScheme": "<path to KColorScheme file>",
"iconTheme": "breeze-dark",
"style": "breeze",
"font": {
"family": "<font name>",
"size": 11,
"weight": -1
},
"fontFixed": {
"family": "<font name>",
"size": 11,
"weight": -1
}
},
"misc": {
"menusHaveIcons": true,
"singleClickActivate": false,
"shortcutsForContextMenus": true
}
}Finally set the environment variable QT_QPA_PLATFORMTHEME to qtengine.
Note
You will also need a Qt5 AND Qt6 build of your theme for things to work!
Thank you hyprqt6engine & qt6ct for being the foundation of this project. Also a thanks to outfoxxed because I "borrowed" a lot of his C++ build tools that made working in C++ a lot less painful, especially on NixOS.