Get QT theme somewhat working

This commit is contained in:
Artemis Tosini 2024-08-22 01:15:24 +00:00
parent 6bf432c2fc
commit 42529fe2a3
Signed by: artemist
GPG key ID: ADFFE553DCBB831E
4 changed files with 52 additions and 20 deletions

View file

@ -11,10 +11,10 @@
./fish.nix ./fish.nix
./git.nix ./git.nix
./gpg.nix ./gpg.nix
./gtk.nix
./mpv.nix ./mpv.nix
./ssh ./ssh
./terminals.nix ./terminals.nix
./theme.nix
./tmux.nix ./tmux.nix
./use-xdg.nix ./use-xdg.nix
]; ];

View file

@ -1,14 +0,0 @@
{ ... }:
let
common-gtk = {
gtk-application-prefer-dark-theme = true;
};
in
{
home.sessionVariables.GTK_THEME = "Adwaita:dark";
gtk = {
enable = true;
gtk3.extraConfig = common-gtk;
gtk4.extraConfig = common-gtk;
};
}

51
home/theme.nix Normal file
View file

@ -0,0 +1,51 @@
{ pkgs, lib, ... }:
let
ini = pkgs.formats.ini { };
common-gtk = {
gtk-application-prefer-dark-theme = true;
};
qtct-config =
pkg: name:
ini.generate "${name}.conf" {
Appearance = {
custom_palette = true;
color_scheme_path = "${pkg}/share/${name}/colors/darker.conf";
style = "Breeze";
icon_theme = "breeze-dark";
standard_dialogs = "default";
};
};
in
{
home.sessionVariables.GTK_THEME = "Adwaita:dark";
gtk = {
enable = true;
gtk3.extraConfig = common-gtk;
gtk4.extraConfig = common-gtk;
};
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
qt = {
enable = true;
platformTheme.name = "qtct";
};
home.packages = with pkgs; [
(lib.lowPrio libsForQt5.breeze-qt5.bin)
kdePackages.breeze
kdePackages.breeze-icons
qt6.qtwayland
];
xdg.configFile = {
"qt5ct/qt5ct.conf".source = qtct-config pkgs.libsForQt5.qt5ct "qt5ct";
"qt6ct/qt6ct.conf".source = qtct-config pkgs.kdePackages.qt6ct "qt6ct";
};
}

View file

@ -64,10 +64,5 @@
}; };
}; };
qt = {
enable = true;
platformTheme = "qt5ct";
};
users.users.artemis.extraGroups = [ "scanner" ]; users.users.artemis.extraGroups = [ "scanner" ];
} }