mirror of
https://github.com/ItsDrike/nixdots
synced 2024-12-25 17:54:35 +00:00
Fix qt themes
This commit is contained in:
parent
1c5581679f
commit
6643627c5b
|
@ -16,8 +16,8 @@ in {
|
|||
then "gtk"
|
||||
else "qtct";
|
||||
style = mkIf (!cfg.forceGtk) {
|
||||
name = "Kvantum";
|
||||
package = cfg.theme.package;
|
||||
# sets QT_STYLE_OVERRIDE
|
||||
name = "kvantum";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -25,10 +25,12 @@ in {
|
|||
packages = with pkgs;
|
||||
mkMerge [
|
||||
[
|
||||
# libraries and programs to ensure that qt applications load without issue
|
||||
# breeze-icons is added as a fallback
|
||||
# QT5 & QT6 configuration tools
|
||||
libsForQt5.qt5ct
|
||||
kdePackages.qt6ct
|
||||
|
||||
# Icon theme (here as fallback)
|
||||
cfg.iconTheme.package
|
||||
breeze-icons
|
||||
]
|
||||
|
||||
|
@ -46,8 +48,8 @@ in {
|
|||
qt6Packages.qtstyleplugin-kvantum
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
|
||||
# Also add the theme package to path just in case
|
||||
cfg.theme.package
|
||||
# Also add the Kvantum theme package to path
|
||||
cfg.kvantumTheme.package
|
||||
])
|
||||
];
|
||||
|
||||
|
@ -67,10 +69,28 @@ in {
|
|||
# tell calibre to use the dark theme, because the light one hurts my eyes
|
||||
CALIBRE_USE_DARK_PALETTE = "1";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile = mkIf (!cfg.forceGtk) {
|
||||
"Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" {
|
||||
General.theme = cfg.theme.name;
|
||||
xdg.configFile = mkIf (!cfg.forceGtk) {
|
||||
# Kvantum configuration
|
||||
"Kvantum/kvantum.kvconfig" = {
|
||||
text = lib.generators.toINI {} {
|
||||
General.theme = cfg.kvantumTheme.name;
|
||||
};
|
||||
};
|
||||
"Kvantum/${cfg.kvantumTheme.name}".source = "${cfg.kvantumTheme.package}/share/Kvantum/${cfg.kvantumTheme.name}";
|
||||
|
||||
|
||||
# Set icon theme using qtct
|
||||
"qt5ct/qt5ct.conf".text = lib.generators.toINI {} {
|
||||
Appearance = {
|
||||
icon_theme = cfg.iconTheme.name;
|
||||
};
|
||||
};
|
||||
|
||||
"qt6ct/qt6ct.conf".text = lib.generators.toINI {} {
|
||||
Appearance = {
|
||||
icon_theme = cfg.iconTheme.name;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -69,12 +69,15 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
theme = {
|
||||
kvantumTheme = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "Catppuccin-Mocha-Dark";
|
||||
default = "Catppuccin-Mocha-Blue";
|
||||
description = ''
|
||||
The name for the QT theme package.
|
||||
The name for the QT kvantum theme.
|
||||
|
||||
This needs to match the directory containing the kvconfig & svg files
|
||||
for selected theme. The package should expose these in /share/Kvantum.
|
||||
|
||||
This has no effect if forceGtk is set.
|
||||
'';
|
||||
|
@ -83,14 +86,42 @@ in
|
|||
package = mkOption {
|
||||
type = types.package;
|
||||
description = ''
|
||||
The theme package to be used for QT programs.
|
||||
The theme package to be used for QT kvantum theme.
|
||||
|
||||
This needs to expose a directory in /share/Kvantum with the
|
||||
kvconfig & svg files. The name of this directory should match
|
||||
the kvantumTheme.name option.
|
||||
|
||||
This has no effect if forceGtk is set.
|
||||
'';
|
||||
default = pkgs.catppuccin-kde.override {
|
||||
flavour = ["mocha"];
|
||||
accents = ["blue"];
|
||||
winDecStyles = ["modern"];
|
||||
default = pkgs.catppuccin-kvantum.override {
|
||||
variant = "Mocha";
|
||||
accent = "Blue";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
description = ''
|
||||
The name for the icon theme that will be used for QT programs.
|
||||
|
||||
This has no effect if forceGtk is set.
|
||||
'';
|
||||
default = "Papirus-Dark";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
description = ''
|
||||
The QT icon theme package to be used.
|
||||
|
||||
This has no effect if forceGtk is set.
|
||||
'';
|
||||
default = pkgs.catppuccin-papirus-folders.override {
|
||||
accent = "blue";
|
||||
flavor = "mocha";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -21,9 +21,5 @@ in
|
|||
sound = {
|
||||
enable = mkEnableOption "sound related programs and audio-dependent programs";
|
||||
};
|
||||
|
||||
bluetooth = {
|
||||
enable = mkEnableOption "bluetooth modules, drivers and configuration program(s)";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue