2024-06-11 17:49:50 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
2024-06-26 22:13:02 -04:00
|
|
|
config = lib.mkIf config.ar.home.theme.enable {
|
2024-07-01 22:59:41 -04:00
|
|
|
home = {
|
|
|
|
packages = with pkgs; [gnome.adwaita-icon-theme];
|
|
|
|
|
|
|
|
pointerCursor = {
|
|
|
|
gtk.enable = true;
|
|
|
|
name = config.ar.home.theme.cursorTheme.name;
|
|
|
|
package = config.ar.home.theme.cursorTheme.package;
|
|
|
|
size = config.ar.home.theme.cursorTheme.size;
|
|
|
|
|
|
|
|
x11 = {
|
|
|
|
enable = true;
|
|
|
|
defaultCursor = config.ar.home.theme.cursorTheme.name;
|
|
|
|
};
|
2024-06-11 17:49:50 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
qt = {
|
|
|
|
enable = true;
|
|
|
|
platformTheme.name = "qtct";
|
2024-07-01 22:59:41 -04:00
|
|
|
style = {
|
|
|
|
package = config.ar.home.theme.qt.package;
|
|
|
|
name = config.ar.home.theme.qt.name;
|
2024-06-11 17:49:50 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
fonts.fontconfig = {
|
|
|
|
enable = true;
|
|
|
|
defaultFonts = {
|
2024-06-26 22:13:02 -04:00
|
|
|
monospace = [config.ar.home.theme.terminalFont.name];
|
2024-06-11 17:49:50 -04:00
|
|
|
serif = ["NotoSerif Nerd Font"];
|
2024-06-26 22:13:02 -04:00
|
|
|
sansSerif = [config.ar.home.theme.font.name];
|
2024-06-11 17:49:50 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
gtk = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
theme = {
|
2024-06-26 22:13:02 -04:00
|
|
|
package = config.ar.home.theme.gtk.package;
|
|
|
|
name = config.ar.home.theme.gtk.name;
|
2024-06-11 17:49:50 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
iconTheme = {
|
2024-06-26 22:13:02 -04:00
|
|
|
package = config.ar.home.theme.iconTheme.package;
|
|
|
|
name = config.ar.home.theme.iconTheme.name;
|
2024-06-11 17:49:50 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
font = {
|
2024-06-26 22:13:02 -04:00
|
|
|
name = "${config.ar.home.theme.font.name} Regular";
|
|
|
|
package = config.ar.home.theme.font.package;
|
|
|
|
size = config.ar.home.theme.font.size;
|
2024-06-11 17:49:50 -04:00
|
|
|
};
|
|
|
|
|
2024-06-26 22:13:02 -04:00
|
|
|
gtk3.extraConfig = lib.attrsets.optionalAttrs (config.ar.home.theme.colors.preferDark) {gtk-application-prefer-dark-theme = 1;};
|
2024-06-11 17:49:50 -04:00
|
|
|
|
2024-06-26 22:13:02 -04:00
|
|
|
gtk4.extraConfig = lib.attrsets.optionalAttrs (config.ar.home.theme.colors.preferDark) {gtk-application-prefer-dark-theme = 1;};
|
2024-06-11 17:49:50 -04:00
|
|
|
|
2024-07-01 22:59:41 -04:00
|
|
|
gtk3.extraCss = ''
|
|
|
|
@define-color accent_bg_color ${config.ar.home.theme.colors.primary};
|
|
|
|
@define-color accent_color @accent_bg_color;
|
|
|
|
|
|
|
|
${
|
|
|
|
if config.ar.home.theme.gtk.hideTitleBar
|
|
|
|
then ''
|
|
|
|
/* 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;
|
|
|
|
}
|
|
|
|
''
|
|
|
|
else "/* */"
|
|
|
|
}
|
|
|
|
'';
|
2024-06-11 17:49:50 -04:00
|
|
|
|
|
|
|
gtk4.extraCss = config.gtk.gtk3.extraCss;
|
|
|
|
};
|
|
|
|
|
|
|
|
dconf.settings = {
|
2024-06-26 22:13:02 -04:00
|
|
|
"org/cinnamon/desktop/background".picture-uri = "file://${config.ar.home.theme.wallpaper}";
|
2024-06-22 18:07:46 -04:00
|
|
|
|
|
|
|
"org/cinnamon/desktop/interface" = {
|
2024-06-26 22:13:02 -04:00
|
|
|
cursor-size = config.ar.home.theme.cursorTheme.size;
|
|
|
|
cursor-theme = config.ar.home.theme.cursorTheme.name;
|
|
|
|
font-name = "${config.ar.home.theme.font.name} Regular ${toString config.ar.home.theme.font.size}";
|
|
|
|
gtk-theme = config.ar.home.theme.gtk.name;
|
|
|
|
icon-theme = config.ar.home.theme.iconTheme.name;
|
2024-06-22 18:07:46 -04:00
|
|
|
};
|
|
|
|
|
2024-06-26 22:13:02 -04:00
|
|
|
"org/cinnamon/theme".name = config.ar.home.theme.gtk.name;
|
|
|
|
"org/cinnamon/desktop/wm/preferences".titlebar-font = "${config.ar.home.theme.font.name} ${toString config.ar.home.theme.font.size}";
|
2024-06-22 18:07:46 -04:00
|
|
|
|
2024-06-26 22:13:02 -04:00
|
|
|
"org/gnome/desktop/background".picture-uri = "file://${config.ar.home.theme.wallpaper}";
|
|
|
|
"org/gnome/desktop/background".picture-uri-dark = "file://${config.ar.home.theme.wallpaper}";
|
2024-06-22 18:07:46 -04:00
|
|
|
"org/gnome/desktop/interface" = {
|
|
|
|
color-scheme =
|
2024-06-26 22:13:02 -04:00
|
|
|
if config.ar.home.theme.colors.preferDark
|
2024-06-22 18:07:46 -04:00
|
|
|
then "prefer-dark"
|
|
|
|
else "prefer-light";
|
2024-06-26 22:13:02 -04:00
|
|
|
cursor-theme = config.ar.home.theme.cursorTheme.name;
|
|
|
|
cursor-size = config.ar.home.theme.cursorTheme.size;
|
|
|
|
gtk-theme = config.ar.home.theme.gtk.name;
|
|
|
|
icon-theme = config.ar.home.theme.iconTheme.name;
|
|
|
|
monospace-font-name = "${config.ar.home.theme.terminalFont.name} Regular ${toString config.ar.home.theme.terminalFont.size}";
|
2024-06-11 17:49:50 -04:00
|
|
|
};
|
2024-06-22 18:07:46 -04:00
|
|
|
|
2024-06-26 22:13:02 -04:00
|
|
|
"org/gnome/desktop/wm/preferences".titlebar-font = "${config.ar.home.theme.font.name} ${toString config.ar.home.theme.font.size}";
|
2024-06-11 17:49:50 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|