mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 12:31:55 -05:00
home/theme: remove abstractions and simplify options
* removed gtk and icon theme option abstractions * home/theme: remove cursorTheme options * rustboro/home: migrate cursor theme overrides * home/theme: use config.gtk.font instead of options.nix abstractions * home/them: dark mode/light mode check for icons * home/theme: remove terminalFont options * home: move home.themes.colors.darkMode to home.themes.darkMode * home/them: improve gnome font settings * waybar: stay dark even when in light mode
This commit is contained in:
parent
94b2c9f349
commit
76e6626187
|
@ -18,10 +18,10 @@
|
|||
};
|
||||
font = {
|
||||
normal = {
|
||||
family = "${config.ar.home.theme.terminalFont.name}";
|
||||
family = "NotoSansM Nerd Font";
|
||||
style = "Regular";
|
||||
};
|
||||
size = config.ar.home.theme.terminalFont.size;
|
||||
size = config.gtk.font.size;
|
||||
};
|
||||
selection.save_to_clipboard = true;
|
||||
window = {
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
};
|
||||
|
||||
main = {
|
||||
font = "${config.ar.home.theme.terminalFont.name}:size=${toString config.ar.home.theme.terminalFont.size}";
|
||||
icon-theme = "${config.ar.home.theme.iconTheme.name}";
|
||||
font = "NotoSansM Nerd Font:size=${toString config.gtk.font.size}";
|
||||
icon-theme = "${config.gtk.iconTheme.name}";
|
||||
layer = "overlay";
|
||||
lines = 3;
|
||||
terminal = lib.getExe config.ar.home.defaultApps.terminal;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
borderSize = 2;
|
||||
borderRadius = 10;
|
||||
defaultTimeout = 10000;
|
||||
font = "${config.ar.home.theme.font.name} Regular ${toString config.ar.home.theme.font.size}";
|
||||
font = "${config.gtk.font.name} Regular ${toString config.gtk.font.size}";
|
||||
height = 300;
|
||||
layer = "top";
|
||||
padding = "15";
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
caps-lock-key-hl-color=e78284
|
||||
color=303446
|
||||
daemonize
|
||||
font="${config.ar.home.theme.terminalFont.name}-Regular"
|
||||
font="NotoSansMNerdFont-Regular"
|
||||
image=${config.ar.home.theme.wallpaper}
|
||||
indicator-caps-lock
|
||||
indicator-idle-visible
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
enableExtensionUpdateCheck = false;
|
||||
userSettings = {
|
||||
"diffEditor.ignoreTrimWhitespace" = false;
|
||||
"editor.fontFamily" = "'NotoSansM Nerd Font','${config.ar.home.theme.terminalFont.name}', 'monospace', monospace";
|
||||
"editor.fontFamily" = "'NotoSansM Nerd Font', 'monospace', monospace";
|
||||
"editor.fontSize" = lib.mkDefault 14;
|
||||
"editor.rulers" = [80];
|
||||
"explorer.confirmDelete" = false;
|
||||
|
@ -30,7 +30,7 @@
|
|||
else "native";
|
||||
"window.zoomPerWindow" = false;
|
||||
"workbench.colorTheme" =
|
||||
if config.ar.home.theme.colors.preferDark
|
||||
if config.ar.home.theme.darkMode
|
||||
then "Adwaita Dark"
|
||||
else "Adwaita Light";
|
||||
"workbench.iconTheme" = "null";
|
||||
|
|
|
@ -174,7 +174,7 @@
|
|||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: "${config.ar.home.theme.terminalFont.name}";
|
||||
font-family: "NotoSansM Nerd Font";
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
@ -251,11 +251,7 @@
|
|||
#custom-hyprland-close,
|
||||
#hardware {
|
||||
border-radius: 10;
|
||||
background: rgba ${
|
||||
if config.ar.home.theme.colors.preferDark
|
||||
then "(36, 36, 36, 0.8);"
|
||||
else "(250, 250, 250, 0.8);"
|
||||
}
|
||||
background: rgba (36, 36, 36, 0.8);
|
||||
margin: 5px 10px 0px 10px;
|
||||
padding: 0px 10px 0px 10px;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
* {
|
||||
background-image: none;
|
||||
box-shadow: none;
|
||||
font-family: "${config.ar.home.theme.font.name}", sans-serif;
|
||||
font-family: "${config.gtk.font.name}", sans-serif;
|
||||
transition: 20ms;
|
||||
}
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@
|
|||
env = GDK_SCALE,${gdk_scale}
|
||||
|
||||
# Some default env vars.
|
||||
env = XCURSOR_SIZE,${toString config.ar.home.theme.cursorTheme.size}
|
||||
env = XCURSOR_SIZE,${toString config.home.pointerCursor.size}
|
||||
env = QT_QPA_PLATFORMTHEME,qt6ct
|
||||
|
||||
# Execute necessary apps
|
||||
|
|
|
@ -115,9 +115,9 @@
|
|||
# mouseWarping = "container";
|
||||
};
|
||||
fonts = {
|
||||
names = ["${config.ar.home.theme.font.name}"];
|
||||
names = ["${config.gtk.font.name}"];
|
||||
style = "Bold";
|
||||
size = config.ar.home.theme.font.size + 0.0;
|
||||
size = config.gtk.font.size + 0.0;
|
||||
};
|
||||
gaps.inner = 5;
|
||||
gaps.outer = 5;
|
||||
|
|
|
@ -235,121 +235,13 @@
|
|||
theme = {
|
||||
enable = lib.mkEnableOption "Gtk, Qt, and application colors.";
|
||||
|
||||
gtk = {
|
||||
name = lib.mkOption {
|
||||
description = "GTK theme name.";
|
||||
default = "adw-gtk3-dark";
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
package = lib.mkOption {
|
||||
description = "GTK theme package.";
|
||||
default = pkgs.adw-gtk3;
|
||||
type = lib.types.package;
|
||||
};
|
||||
|
||||
hideTitleBar = lib.mkOption {
|
||||
description = "Whether to hide GTK3/4 titlebars (useful for some window managers).";
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
name = lib.mkOption {
|
||||
description = "Qt theme name.";
|
||||
default = "Adwaita-Dark";
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
package = lib.mkOption {
|
||||
description = "Qt theme package.";
|
||||
default = pkgs.adwaita-qt;
|
||||
type = lib.types.package;
|
||||
};
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
name = lib.mkOption {
|
||||
description = "Icon theme name.";
|
||||
default = "Papirus-Dark";
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
package = lib.mkOption {
|
||||
description = "Icon theme package.";
|
||||
default = pkgs.papirus-icon-theme;
|
||||
type = lib.types.package;
|
||||
};
|
||||
};
|
||||
|
||||
cursorTheme = {
|
||||
name = lib.mkOption {
|
||||
description = "Cursor theme name.";
|
||||
default = "Bibata-Modern-Classic";
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
size = lib.mkOption {
|
||||
description = "Cursor size.";
|
||||
default = 20;
|
||||
type = lib.types.int;
|
||||
};
|
||||
|
||||
package = lib.mkOption {
|
||||
description = "Cursor theme package.";
|
||||
default = pkgs.bibata-cursors;
|
||||
type = lib.types.package;
|
||||
};
|
||||
};
|
||||
|
||||
font = {
|
||||
name = lib.mkOption {
|
||||
description = "Font name.";
|
||||
default = "NotoSans Nerd Font";
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
size = lib.mkOption {
|
||||
description = "Font size.";
|
||||
default = 11;
|
||||
type = lib.types.int;
|
||||
};
|
||||
|
||||
package = lib.mkOption {
|
||||
description = "Font package.";
|
||||
default = pkgs.nerdfonts;
|
||||
type = lib.types.package;
|
||||
};
|
||||
};
|
||||
|
||||
terminalFont = {
|
||||
name = lib.mkOption {
|
||||
description = "Font name.";
|
||||
default = "NotoSansM Nerd Font";
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
size = lib.mkOption {
|
||||
description = "Font size.";
|
||||
default = 11;
|
||||
type = lib.types.int;
|
||||
};
|
||||
|
||||
package = lib.mkOption {
|
||||
description = "Font package.";
|
||||
default = pkgs.nerdfonts;
|
||||
type = lib.types.package;
|
||||
};
|
||||
};
|
||||
|
||||
colors = {
|
||||
preferDark = lib.mkOption {
|
||||
darkMode = lib.mkOption {
|
||||
description = "Whether to prefer dark mode apps or not.";
|
||||
default = config.ar.home.theme.enable;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
colors = {
|
||||
text = lib.mkOption {
|
||||
description = "Text color.";
|
||||
default = "#FFFFFF";
|
||||
|
@ -387,6 +279,12 @@
|
|||
};
|
||||
};
|
||||
|
||||
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";
|
||||
|
|
|
@ -10,32 +10,23 @@
|
|||
|
||||
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;
|
||||
name = "Bibata-Modern-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = lib.mkDefault 20;
|
||||
|
||||
x11 = {
|
||||
enable = true;
|
||||
defaultCursor = config.ar.home.theme.cursorTheme.name;
|
||||
defaultCursor = config.home.pointerCursor.name;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "qtct";
|
||||
style = {
|
||||
package = config.ar.home.theme.qt.package;
|
||||
name = config.ar.home.theme.qt.name;
|
||||
};
|
||||
};
|
||||
|
||||
fonts.fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
monospace = [config.ar.home.theme.terminalFont.name];
|
||||
monospace = ["NotoSansM Nerd Font"];
|
||||
serif = ["NotoSerif Nerd Font"];
|
||||
sansSerif = [config.ar.home.theme.font.name];
|
||||
sansSerif = [config.gtk.font.name];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -43,24 +34,30 @@
|
|||
enable = true;
|
||||
|
||||
theme = {
|
||||
package = config.ar.home.theme.gtk.package;
|
||||
name = config.ar.home.theme.gtk.name;
|
||||
package = pkgs.adw-gtk3;
|
||||
name =
|
||||
if config.ar.home.theme.darkMode
|
||||
then "adw-gtk3-dark"
|
||||
else "adw-gtk3";
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
package = config.ar.home.theme.iconTheme.package;
|
||||
name = config.ar.home.theme.iconTheme.name;
|
||||
package = pkgs.papirus-icon-theme;
|
||||
name =
|
||||
if config.ar.home.theme.darkMode
|
||||
then "Papirus-Dark"
|
||||
else "Papirus";
|
||||
};
|
||||
|
||||
font = {
|
||||
name = "${config.ar.home.theme.font.name} Regular";
|
||||
package = config.ar.home.theme.font.package;
|
||||
size = config.ar.home.theme.font.size;
|
||||
name = "NotoSans Nerd Font";
|
||||
package = pkgs.nerdfonts;
|
||||
size = lib.mkDefault 11;
|
||||
};
|
||||
|
||||
gtk3.extraConfig = lib.attrsets.optionalAttrs (config.ar.home.theme.colors.preferDark) {gtk-application-prefer-dark-theme = 1;};
|
||||
gtk3.extraConfig = lib.attrsets.optionalAttrs (config.ar.home.theme.darkMode) {gtk-application-prefer-dark-theme = 1;};
|
||||
|
||||
gtk4.extraConfig = lib.attrsets.optionalAttrs (config.ar.home.theme.colors.preferDark) {gtk-application-prefer-dark-theme = 1;};
|
||||
gtk4.extraConfig = lib.attrsets.optionalAttrs (config.ar.home.theme.darkMode) {gtk-application-prefer-dark-theme = 1;};
|
||||
|
||||
gtk3.extraCss = ''
|
||||
@define-color accent_bg_color ${config.ar.home.theme.colors.primary};
|
||||
|
@ -96,35 +93,74 @@
|
|||
gtk4.extraCss = config.gtk.gtk3.extraCss;
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "qtct";
|
||||
style = {
|
||||
package = pkgs.adwaita-qt;
|
||||
name =
|
||||
if config.ar.home.theme.darkMode
|
||||
then "Adwaita Dark"
|
||||
else "Adwaita";
|
||||
};
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/cinnamon/desktop/background".picture-uri = "file://${config.ar.home.theme.wallpaper}";
|
||||
|
||||
"org/cinnamon/desktop/interface" = {
|
||||
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;
|
||||
cursor-size = config.home.pointerCursor.size;
|
||||
cursor-theme = config.home.pointerCursor.name;
|
||||
font-name = "${config.gtk.font.name} ${toString config.gtk.font.size}";
|
||||
|
||||
gtk-theme =
|
||||
if config.ar.home.theme.darkMode
|
||||
then "adw-gtk3-dark"
|
||||
else "adw-gtk3";
|
||||
|
||||
icon-theme =
|
||||
if config.ar.home.theme.darkMode
|
||||
then "Papirus-Dark"
|
||||
else "Papirus";
|
||||
};
|
||||
|
||||
"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}";
|
||||
"org/cinnamon/theme".name =
|
||||
if config.ar.home.theme.darkMode
|
||||
then "adw-gtk3-dark"
|
||||
else "adw-gtk3";
|
||||
|
||||
"org/cinnamon/desktop/wm/preferences".titlebar-font = "${config.gtk.font.name} ${toString config.gtk.font.size}";
|
||||
|
||||
"org/gnome/desktop/background" = {
|
||||
picture-uri = "file://${config.ar.home.theme.wallpaper}";
|
||||
picture-uri-dark = "file://${config.ar.home.theme.wallpaper}";
|
||||
};
|
||||
|
||||
"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}";
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme =
|
||||
if config.ar.home.theme.colors.preferDark
|
||||
if config.ar.home.theme.darkMode
|
||||
then "prefer-dark"
|
||||
else "prefer-light";
|
||||
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}";
|
||||
|
||||
cursor-theme = config.home.pointerCursor.name;
|
||||
cursor-size = config.home.pointerCursor.size;
|
||||
|
||||
document-font-name = "NotoSerif Nerd Font ${toString config.gtk.font.size}";
|
||||
|
||||
gtk-theme =
|
||||
if config.ar.home.theme.darkMode
|
||||
then "adw-gtk3-dark"
|
||||
else "adw-gtk3";
|
||||
|
||||
icon-theme =
|
||||
if config.ar.home.theme.darkMode
|
||||
then "Papirus-Dark"
|
||||
else "Papirus";
|
||||
|
||||
monospace-font-name = "NotoSansM Nerd Font ${toString config.gtk.font.size}";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/wm/preferences".titlebar-font = "${config.ar.home.theme.font.name} ${toString config.ar.home.theme.font.size}";
|
||||
"org/gnome/desktop/wm/preferences".titlebar-font = "${config.gtk.font.name} ${toString config.gtk.font.size}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,16 +11,16 @@
|
|||
programs.vscode.userSettings = {
|
||||
"editor.fontSize" = lib.mkForce "16";
|
||||
};
|
||||
|
||||
home.pointerCursor.size = lib.mkForce 24;
|
||||
|
||||
gtk.font.size = lib.mkForce 14;
|
||||
|
||||
ar.home = {
|
||||
services.easyeffects = {
|
||||
enable = true;
|
||||
preset = "LoudnessEqualizer";
|
||||
};
|
||||
theme = {
|
||||
cursorTheme.size = lib.mkForce 24;
|
||||
font.size = lib.mkForce 14;
|
||||
terminalFont.size = lib.mkForce 14;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue