2024-06-11 17:49:50 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
2024-07-09 23:41:52 -04:00
|
|
|
}: let
|
|
|
|
cfg = config.ar.home.theme;
|
2024-08-07 00:00:27 -04:00
|
|
|
|
|
|
|
gtk = {
|
|
|
|
extraConfig = lib.attrsets.optionalAttrs (cfg.darkMode) {gtk-application-prefer-dark-theme = 1;};
|
|
|
|
|
|
|
|
extraCss = ''
|
|
|
|
@define-color accent_bg_color ${cfg.colors.primary};
|
|
|
|
@define-color accent_color @accent_bg_color;
|
2024-08-09 00:59:54 -04:00
|
|
|
@define-color accent_fg_color ${cfg.colors.text};
|
|
|
|
@define-color window_bg_color ${cfg.colors.background};
|
|
|
|
@define-color window_fg_color ${cfg.colors.text};
|
|
|
|
@define-color view_bg_color ${cfg.colors.background};
|
|
|
|
@define-color view_fg_color @window_fg_color;
|
|
|
|
@define-color headerbar_bg_color ${cfg.colors.background};
|
|
|
|
@define-color headerbar_backdrop_color @window_bg_color;
|
|
|
|
@define-color headerbar_fg_color @window_fg_color;
|
|
|
|
|
|
|
|
@define-color popover_bg_color ${cfg.colors.background};
|
|
|
|
@define-color popover_fg_color @view_fg_color;
|
|
|
|
@define-color dialog_bg_color @popover_bg_color;
|
|
|
|
@define-color dialog_fg_color @popover_fg_color;
|
|
|
|
@define-color card_bg_color @popover_bg_color;
|
|
|
|
@define-color card_fg_color @window_fg_color;
|
|
|
|
@define-color sidebar_bg_color @headerbar_bg_color;
|
|
|
|
@define-color sidebar_fg_color @window_fg_color;
|
|
|
|
@define-color sidebar_backdrop_color @window_bg_color;
|
|
|
|
@define-color sidebar_shade_color rgba(0,0,0,0.25);
|
2024-08-07 00:00:27 -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
|
|
|
in {
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
home = {
|
2024-08-07 00:00:27 -04:00
|
|
|
packages = [
|
2024-08-07 23:09:31 -04:00
|
|
|
cfg.monospaceFont.package
|
|
|
|
cfg.sansFont.package
|
|
|
|
cfg.serifFont.package
|
2024-08-07 00:00:27 -04:00
|
|
|
pkgs.adwaita-qt
|
|
|
|
pkgs.gnome.adwaita-icon-theme
|
|
|
|
pkgs.liberation_ttf
|
2024-07-14 15:45:23 -04:00
|
|
|
];
|
2024-07-09 23:41:52 -04:00
|
|
|
|
|
|
|
pointerCursor = {
|
|
|
|
gtk.enable = true;
|
|
|
|
name = "Bibata-Modern-Classic";
|
|
|
|
package = pkgs.bibata-cursors;
|
2024-07-27 19:23:01 -04:00
|
|
|
size = lib.mkDefault 24;
|
2024-07-09 23:41:52 -04:00
|
|
|
|
|
|
|
x11 = {
|
|
|
|
enable = true;
|
|
|
|
defaultCursor = config.home.pointerCursor.name;
|
2024-07-01 22:59:41 -04:00
|
|
|
};
|
2024-06-11 17:49:50 -04:00
|
|
|
};
|
2024-07-09 23:41:52 -04:00
|
|
|
};
|
2024-06-11 17:49:50 -04:00
|
|
|
|
2024-07-09 23:41:52 -04:00
|
|
|
fonts.fontconfig = {
|
|
|
|
enable = true;
|
2024-08-04 15:28:58 -04:00
|
|
|
|
2024-07-09 23:41:52 -04:00
|
|
|
defaultFonts = {
|
2024-08-07 23:09:31 -04:00
|
|
|
monospace = [cfg.monospaceFont.name];
|
|
|
|
sansSerif = [cfg.sansFont.name];
|
|
|
|
serif = [cfg.serifFont.name];
|
2024-06-11 17:49:50 -04:00
|
|
|
};
|
2024-07-09 23:41:52 -04:00
|
|
|
};
|
2024-06-11 17:49:50 -04:00
|
|
|
|
2024-07-09 23:41:52 -04:00
|
|
|
gtk = {
|
|
|
|
enable = true;
|
2024-06-11 17:49:50 -04:00
|
|
|
|
2024-07-09 23:41:52 -04:00
|
|
|
theme = {
|
|
|
|
name =
|
|
|
|
if cfg.darkMode
|
|
|
|
then "adw-gtk3-dark"
|
|
|
|
else "adw-gtk3";
|
2024-08-07 00:00:27 -04:00
|
|
|
|
|
|
|
package = pkgs.adw-gtk3;
|
2024-07-09 23:41:52 -04:00
|
|
|
};
|
2024-07-07 01:51:26 -04:00
|
|
|
|
2024-08-07 23:09:31 -04:00
|
|
|
font = {inherit (cfg.sansFont) name package size;};
|
2024-08-07 00:00:27 -04:00
|
|
|
|
2024-07-09 23:41:52 -04:00
|
|
|
iconTheme = {
|
|
|
|
name =
|
|
|
|
if cfg.darkMode
|
|
|
|
then "Papirus-Dark"
|
|
|
|
else "Papirus";
|
2024-06-11 17:49:50 -04:00
|
|
|
|
2024-08-08 22:22:14 -04:00
|
|
|
package = pkgs.papirus-nord;
|
2024-07-10 23:43:51 -04:00
|
|
|
};
|
|
|
|
|
2024-08-07 00:00:27 -04:00
|
|
|
gtk3 = {inherit (gtk) extraConfig extraCss;};
|
|
|
|
gtk4 = {inherit (gtk) extraConfig extraCss;};
|
2024-07-09 23:41:52 -04:00
|
|
|
};
|
2024-06-11 17:49:50 -04:00
|
|
|
|
2024-07-09 23:41:52 -04:00
|
|
|
qt = {
|
|
|
|
enable = true;
|
|
|
|
platformTheme.name = "qtct";
|
2024-08-07 00:00:27 -04:00
|
|
|
|
2024-07-09 23:41:52 -04:00
|
|
|
style = {
|
|
|
|
name =
|
|
|
|
if cfg.darkMode
|
|
|
|
then "Adwaita-Dark"
|
|
|
|
else "Adwaita";
|
2024-08-07 00:00:27 -04:00
|
|
|
|
|
|
|
package = pkgs.adwaita-qt6;
|
2024-07-09 23:41:52 -04:00
|
|
|
};
|
|
|
|
};
|
2024-07-03 10:35:39 -04:00
|
|
|
|
2024-07-09 23:41:52 -04:00
|
|
|
dconf.settings = {
|
|
|
|
"org/gnome/desktop/background" = {
|
|
|
|
picture-uri = "file://${cfg.wallpaper}";
|
|
|
|
picture-uri-dark = "file://${cfg.wallpaper}";
|
|
|
|
};
|
2024-07-03 10:35:39 -04:00
|
|
|
|
2024-07-09 23:41:52 -04:00
|
|
|
"org/gnome/desktop/interface" = {
|
|
|
|
color-scheme =
|
|
|
|
if cfg.darkMode
|
|
|
|
then "prefer-dark"
|
|
|
|
else "prefer-light";
|
2024-07-03 10:35:39 -04:00
|
|
|
|
2024-08-07 23:09:31 -04:00
|
|
|
document-font-name = "${cfg.serifFont.name} ${toString cfg.serifFont.size}";
|
|
|
|
monospace-font-name = "${cfg.monospaceFont.name} ${toString cfg.monospaceFont.size}";
|
2024-06-11 17:49:50 -04:00
|
|
|
};
|
2024-07-09 23:41:52 -04:00
|
|
|
|
2024-08-07 23:09:31 -04:00
|
|
|
"org/gnome/desktop/wm/preferences".titlebar-font = "${cfg.sansFont.name} ${toString cfg.sansFont.size}";
|
2024-06-11 17:49:50 -04:00
|
|
|
};
|
2024-07-09 23:41:52 -04:00
|
|
|
};
|
2024-06-11 17:49:50 -04:00
|
|
|
}
|