nixcfg/homeManagerModules/theme.nix

76 lines
1.6 KiB
Nix
Raw Permalink 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";
2024-08-17 14:00:05 -04:00
package = pkgs.adwaita-qt;
2024-08-15 17:41:50 -04:00
};
};
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 */
2024-08-24 11:06:22 -04:00
border-radius: 0;
border: 0;
box-shadow: none;
font-size: 0;
2024-08-15 18:06:42 -04:00
margin-bottom: 50px;
margin-top: -100px;
min-height: 0;
2024-08-24 11:06:22 -04:00
padding: 0;
2024-08-15 18:06:42 -04:00
}
.titlebar,
.titlebar .background
{
2024-08-24 11:06:22 -04:00
border-radius: 0;
}
2024-08-15 18:06:42 -04:00
/* rm -rf window shadows */
window.csd, /* gtk4? */
window.csd decoration { /* gtk3 */
2024-08-24 11:06:22 -04:00
border-radius: 0;
2024-08-15 18:06:42 -04:00
box-shadow: none;
}
''
}
'';
2024-07-09 23:41:52 -04:00
};
}