1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-10 13:13:57 +00:00
ultima/modules/home/themes/gtk/default.nix

46 lines
1 KiB
Nix
Raw Normal View History

{ x, pkgs, lib, config, ... }:
2024-11-21 09:24:15 +00:00
with lib;
2024-12-09 01:15:55 +00:00
with x;
2024-11-21 09:24:15 +00:00
let
cfg = config.module.themes.gtk;
2024-12-09 01:15:55 +00:00
font = config.stylix.fonts;
2024-11-21 09:24:15 +00:00
extra = {
gtk-application-prefer-dark-theme = 1;
gtk-xft-antialias = 1;
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintslight";
gtk-xft-rgba = "rgb";
gtk-button-images = 0;
gtk-menu-images = 0;
gtk-enable-event-sounds = 1;
gtk-enable-input-feedback-sounds = 0;
};
in {
options = {
module.themes.gtk = {
2024-12-09 01:15:55 +00:00
enable = mkBool;
icon = mkOpt.str;
2024-11-21 09:24:15 +00:00
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [ noto-fonts noto-fonts-cjk-sans ];
gtk = with pkgs;
True // {
2024-12-05 14:36:13 +00:00
gtk3 = { extraConfig = extra; };
gtk4 = { extraConfig = extra; };
2024-11-21 09:24:15 +00:00
iconTheme = {
name = "Papirus-Dark";
package = papirus-icon-theme.override { color = cfg.icon; };
};
font = lib.mkForce {
size = 12;
2024-12-09 01:15:55 +00:00
name = "${font.monospace.name}";
package = font.monospace.package;
2024-11-21 09:24:15 +00:00
};
};
};
}