nixcfg/homeManagerModules/theme.nix

70 lines
1.5 KiB
Nix
Raw Normal View History

{
pkgs,
lib,
config,
...
2024-07-09 23:41:52 -04:00
}: let
cfg = config.ar.home.theme;
in {
config = lib.mkIf cfg.enable {
2024-08-15 18:06:42 -04:00
home.packages = [
pkgs.gnome.adwaita-icon-theme
pkgs.liberation_ttf
];
2024-08-15 18:06:42 -04:00
gtk.iconTheme = {
name =
if config.stylix.polarity == "dark"
then "Papirus-Dark"
else "Papirus";
2024-08-15 18:06:42 -04:00
package = pkgs.papirus-icon-theme.override {color = "adwaita";};
};
2024-08-15 17:41:50 -04:00
qt = {
enable = true;
platformTheme.name = "qtct";
style = {
name =
if config.stylix.polarity == "dark"
then "Adwaita-Dark"
else "Adwaita";
package = pkgs.adwaita-qt6;
};
};
2024-08-15 18:06:42 -04:00
stylix.targets.gtk.extraCss = ''
// Control rounded corners
2024-08-15 18:31:07 -04:00
window.background { border-radius: ${toString cfg.borders.radius}; }
2024-08-15 18:06:42 -04:00
${
lib.strings.optionalString
cfg.gtk.hideTitleBar
''
/* No (default) title bar on wayland */
headerbar.default-decoration {
/* You may need to tweak these values depending on your GTK theme */
margin-bottom: 50px;
margin-top: -100px;
background: transparent;
padding: 0;
border: 0;
min-height: 0;
font-size: 0;
box-shadow: none;
}
/* rm -rf window shadows */
window.csd, /* gtk4? */
window.csd decoration { /* gtk3 */
box-shadow: none;
}
''
}
'';
2024-07-09 23:41:52 -04:00
};
}