remove theme.colors

This commit is contained in:
Aly Raffauf 2024-08-15 01:51:20 -04:00
parent cfc836943b
commit 545b892c84
12 changed files with 50 additions and 188 deletions

View file

@ -34,7 +34,7 @@ in {
userSettings = {
"diffEditor.ignoreTrimWhitespace" = false;
"editor.fontSize" = cfg.theme.monospaceFont.size + 3;
"editor.fontSize" = config.stylix.fonts.sizes.applications + 3;
"editor.formatOnPaste" = true;
"editor.formatOnSave" = true;
"editor.formatOnType" = true;
@ -77,7 +77,7 @@ in {
"shellformat.flag" = "-i 4";
"terminal.external.linuxExec" = lib.getExe cfg.defaultApps.terminal;
"terminal.integrated.fontSize" = cfg.theme.monospaceFont.size + 3;
"terminal.integrated.fontSize" = config.stylix.fonts.sizes.terminal + 3;
"update.mode" = "none";
"window.menuBarVisibility" = "hidden";
"window.titleBarStyle" = lib.mkDefault "native";

View file

@ -48,8 +48,8 @@ in {
auto_update = false;
autosave.after_delay.milliseconds = 1000;
buffer_font_family = cfg.theme.monospaceFont.name;
buffer_font_size = cfg.theme.monospaceFont.size + 3;
buffer_font_family = config.stylix.fonts.monospace.name;
buffer_font_size = config.stylix.fonts.sizes.applications + 3;
current_line_highlight = "line";
indent_guides = {
@ -89,7 +89,7 @@ in {
metrics = false;
};
terminal.font_size = cfg.theme.monospaceFont.size + 3;
terminal.font_size = config.stylix.fonts.sizes.terminal + 3;
theme = {
dark = "Adwaita Pastel Dark";
@ -97,8 +97,8 @@ in {
mode = "system";
};
ui_font_family = cfg.theme.sansFont.name;
ui_font_size = cfg.theme.sansFont.size + 5;
ui_font_family = config.stylix.fonts.sansSerif.name;
ui_font_size = config.stylix.fonts.sizes.applications + 4;
use_autoclose = false;
vim_mode = false;
};

View file

@ -175,7 +175,6 @@ in {
disable_hyprland_logo = true;
disable_splash_rendering = true;
focus_on_activate = true;
font_family = cfg.theme.sansFont.name;
vfr = true;
};

View file

@ -149,12 +149,10 @@ in {
};
};
startup =
[
{command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";}
{command = lib.getExe pkgs.autotiling;}
]
++ lib.optional (!cfg.services.randomWallpaper.enable) {command = "${lib.getExe pkgs.swaybg} -i ${cfg.theme.wallpaper}";};
startup = [
{command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";}
{command = lib.getExe pkgs.autotiling;}
];
window = {
titlebar = false;
@ -250,7 +248,7 @@ in {
# corner_radius ${toString cfg.theme.borderRadius}
shadows enable
shadows_on_csd enable
shadow_color ${cfg.theme.colors.shadow}
shadow_color ${config.lib.stylix.colors.withHashtag."base00"}CC
default_dim_inactive 0.05

View file

@ -233,59 +233,11 @@ in {
type = lib.types.int;
};
colors = {
text = lib.mkOption {
description = "Text color.";
default = "#FFFFFF";
type = lib.types.str;
};
background = lib.mkOption {
description = "Background color.";
default = "#242424";
type = lib.types.str;
};
primary = lib.mkOption {
description = "Primary color.";
default = "#78AEED"; #"#CA9EE6";
type = lib.types.str;
};
secondary = lib.mkOption {
description = "Secondary color.";
default = "#CA9EE6"; #"#99D1DB";
type = lib.types.str;
};
inactive = lib.mkOption {
description = "Inactive color.";
default = "#242424";
type = lib.types.str;
};
shadow = lib.mkOption {
description = "Drop shadow color.";
default = "#1A1A1A";
type = lib.types.str;
};
};
sansFont = mkFontOption "sans serif" "UbuntuSans Nerd Font" (pkgs.nerdfonts.override {fonts = ["UbuntuSans"];}) 11;
serifFont = mkFontOption "serif" "Vegur" pkgs.vegur 11;
monospaceFont = mkFontOption "monospace" "UbuntuSansMono Nerd Font" (pkgs.nerdfonts.override {fonts = ["UbuntuSans"];}) 11;
gtk.hideTitleBar = lib.mkOption {
description = "Whether to hide GTK3/4 titlebars (useful for some window managers).";
default = false;
type = lib.types.bool;
};
wallpaper = lib.mkOption {
description = "Default wallpaper.";
default = "${config.xdg.dataHome}/backgrounds/jr-korpa-9XngoIpxcEo-unsplash.jpg";
type = lib.types.str;
};
};
};
}

View file

@ -312,14 +312,14 @@ in {
xdg.configFile."nwg-drawer/drawer.css".text = ''
window {
background-color: alpha (${cfg.theme.colors.background}, 0.8);
color: ${cfg.theme.colors.text}
background-color: alpha (${config.lib.stylix.colors.withHashtag."base00"}, ${toString config.stylix.opacity.popups});
color: ${config.lib.stylix.colors.withHashtag."base05"}
}
/* search entry */
entry {
background-color: rgba (0, 0, 0, 0.2);
border: 4px solid ${cfg.theme.colors.primary};
border: alpha(${config.lib.stylix.colors.withHashtag."base07"}, ${toString config.stylix.opacity.popups});
border-radius: ${toString cfg.theme.borderRadius}px
}
@ -330,10 +330,10 @@ in {
}
button:active, button:hover, button:focused {
background-color: alpha (${cfg.theme.colors.text}, 0.2);
background-color: alpha (${config.lib.stylix.colors.withHashtag."base05"}, 0.2);
border: none;
border-radius: ${toString cfg.theme.borderRadius}px;
color: ${cfg.theme.colors.secondary}
color:${config.lib.stylix.colors.withHashtag."base02"}
}
#category-button {

View file

@ -7,107 +7,42 @@
cfg = config.ar.home.theme;
gtk = {
extraConfig = lib.attrsets.optionalAttrs (cfg.darkMode) {gtk-application-prefer-dark-theme = 1;};
extraCss =
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;
extraCss = ''
@define-color accent_bg_color ${cfg.colors.primary};
@define-color accent_color @accent_bg_color;
@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;
background: transparent;
padding: 0;
border: 0;
min-height: 0;
font-size: 0;
box-shadow: none;
}
@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);
${
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;
}
''
}
'';
/* rm -rf window shadows */
window.csd, /* gtk4? */
window.csd decoration { /* gtk3 */
box-shadow: none;
}
'';
};
in {
config = lib.mkIf cfg.enable {
home = {
packages = [
cfg.monospaceFont.package
cfg.sansFont.package
cfg.serifFont.package
pkgs.adwaita-qt
pkgs.gnome.adwaita-icon-theme
pkgs.liberation_ttf
];
pointerCursor = {
gtk.enable = true;
name = "Bibata-Modern-Classic";
package = pkgs.bibata-cursors;
size = lib.mkDefault 24;
x11 = {
enable = true;
defaultCursor = config.home.pointerCursor.name;
};
};
};
fonts.fontconfig = {
enable = true;
defaultFonts = {
monospace = [cfg.monospaceFont.name];
sansSerif = [cfg.sansFont.name];
serif = [cfg.serifFont.name];
};
};
gtk = {
enable = true;
theme = {
name =
if cfg.darkMode
then "adw-gtk3-dark"
else "adw-gtk3";
package = pkgs.adw-gtk3;
};
font = {inherit (cfg.sansFont) name package size;};
iconTheme = {
name =
if cfg.darkMode
@ -117,8 +52,8 @@ in {
package = pkgs.papirus-icon-theme.override {color = "adwaita";};
};
gtk3 = {inherit (gtk) extraConfig extraCss;};
gtk4 = {inherit (gtk) extraConfig extraCss;};
gtk3 = {inherit (gtk) extraCss;};
gtk4 = {inherit (gtk) extraCss;};
};
qt = {
@ -134,24 +69,5 @@ in {
package = pkgs.adwaita-qt6;
};
};
dconf.settings = {
"org/gnome/desktop/background" = {
picture-uri = "file://${cfg.wallpaper}";
picture-uri-dark = "file://${cfg.wallpaper}";
};
"org/gnome/desktop/interface" = {
color-scheme =
if cfg.darkMode
then "prefer-dark"
else "prefer-light";
document-font-name = "${cfg.serifFont.name} ${toString cfg.serifFont.size}";
monospace-font-name = "${cfg.monospaceFont.name} ${toString cfg.monospaceFont.size}";
};
"org/gnome/desktop/wm/preferences".titlebar-font = "${cfg.sansFont.name} ${toString cfg.sansFont.size}";
};
};
}

View file

@ -112,5 +112,7 @@ self: {
gammastep.enable = true;
randomWallpaper.enable = true;
};
theme.enable = true;
};
}

View file

@ -92,5 +92,7 @@ self: {
gammastep.enable = true;
randomWallpaper.enable = false;
};
theme.enable = true;
};
}

View file

@ -10,6 +10,11 @@
environment.systemPackages = with pkgs; [git inxi python3];
home-manager.sharedModules = [
{
}
];
stylix = {
enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-moon.yaml";

View file

@ -20,12 +20,6 @@
enable = true;
preset = "LoudnessEqualizer";
};
theme = {
monospaceFont.size = 14;
sansFont.size = 14;
serifFont.size = 14;
};
};
}
];

View file

@ -10,12 +10,6 @@
enable = true;
preset = "LoudnessEqualizer";
};
theme = {
monospaceFont.size = 14;
sansFont.size = 14;
serifFont.size = 14;
};
};
}
];