2024-05-22 14:29:45 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
2024-05-15 00:14:59 +02:00
|
|
|
theme = {
|
|
|
|
package = pkgs.gruvbox-gtk-theme;
|
|
|
|
name = "Gruvbox-Dark-BL";
|
|
|
|
};
|
2024-08-16 23:31:12 +02:00
|
|
|
cfg = config.modules.usrEnv.style.qt;
|
2024-07-06 13:39:24 +02:00
|
|
|
inherit (config.modules.other.system) username;
|
2024-04-10 17:39:26 +02:00
|
|
|
in {
|
2024-05-15 00:14:59 +02:00
|
|
|
config = mkIf cfg.enable {
|
2024-05-22 14:29:45 +02:00
|
|
|
environment.sessionVariables = {QT_QPA_PLATFORMTHEME = "qt5ct";};
|
2024-08-16 13:32:47 +02:00
|
|
|
|
2024-05-15 00:14:59 +02:00
|
|
|
environment.variables = {
|
|
|
|
QT_STYLE_OVERRIDE = lib.mkForce "kvantum";
|
|
|
|
GTK_THEME = theme.name;
|
|
|
|
};
|
2024-04-10 17:39:26 +02:00
|
|
|
|
2024-11-04 12:47:16 +01:00
|
|
|
# home-manager.users.${username} = {
|
|
|
|
# # This is taken from jacekpoz, thanks a lot!
|
|
|
|
# qt = {
|
|
|
|
# enable = true;
|
|
|
|
# style = {
|
|
|
|
# inherit (cfg) name;
|
|
|
|
# package = cfg.package.override {
|
|
|
|
# flavour = [cfg.variant];
|
|
|
|
# accents = [cfg.accentColor];
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
# home = {
|
|
|
|
# packages = with pkgs; [
|
|
|
|
# qt5.qttools
|
|
|
|
# qt6Packages.qtstyleplugin-kvantum
|
|
|
|
# libsForQt5.qtstyleplugin-kvantum
|
|
|
|
# libsForQt5.qt5ct
|
|
|
|
# ];
|
2024-08-16 13:32:47 +02:00
|
|
|
|
2024-11-04 12:47:16 +01:00
|
|
|
# sessionVariables = {
|
|
|
|
# # Scaling factor for QT applications
|
|
|
|
# QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
2024-08-16 13:32:47 +02:00
|
|
|
|
2024-11-04 12:47:16 +01:00
|
|
|
# # Use wayland as the default backend.
|
|
|
|
# QT_QPA_PLATFORM = "wayland";
|
2024-08-16 13:32:47 +02:00
|
|
|
|
2024-11-04 12:47:16 +01:00
|
|
|
# # Disable window decorations for qt applications.
|
|
|
|
# QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
2024-08-16 13:32:47 +02:00
|
|
|
|
2024-11-04 12:47:16 +01:00
|
|
|
# # Remain compatible with QT5 whenever possible.
|
|
|
|
# DISABLE_QT_COMPAT = "0";
|
2024-08-16 13:32:47 +02:00
|
|
|
|
2024-11-04 12:47:16 +01:00
|
|
|
# # Tell Calibre to use the dark theme.
|
|
|
|
# CALIBRE_USE_DARK_PALETTE = "1";
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
# };
|
2024-05-15 00:14:59 +02:00
|
|
|
};
|
2024-04-10 17:39:26 +02:00
|
|
|
}
|