Rename lib.stylix.scheme -> lib.stylix.colors

Remove kicad-small from Vanguard, add openscad-lsp
This commit is contained in:
Evie Litherland-Smith 2025-02-22 09:34:56 +00:00
parent 74f937e9d6
commit 38a22d6b8d
11 changed files with 114 additions and 112 deletions

View file

@ -35,7 +35,7 @@
blender blender
freecad freecad
openscad openscad
kicad-small openscad-lsp
wineWowPackages.waylandFull wineWowPackages.waylandFull
winetricks winetricks
lutris lutris

View file

@ -108,18 +108,18 @@
fonts.fontconfig = { fonts.fontconfig = {
enable = true; enable = true;
defaultFonts = defaultFonts =
with config.stylix.fonts;
let let
inherit (config.stylix) fonts;
symbols = [ symbols = [
emoji.name fonts.emoji.name
"Symbols Nerd Font" "Symbols Nerd Font"
]; ];
in in
{ {
emoji = symbols; emoji = symbols;
monospace = [ monospace.name ] ++ symbols; monospace = [ fonts.monospace.name ] ++ symbols;
sansSerif = [ sansSerif.name ] ++ symbols; sansSerif = [ fonts.sansSerif.name ] ++ symbols;
serif = [ serif.name ] ++ symbols; serif = [ fonts.serif.name ] ++ symbols;
}; };
}; };
}; };
@ -203,7 +203,7 @@
enable = true; enable = true;
image = ./wallpapers/default.png; image = ./wallpapers/default.png;
base16Scheme = lib.mkDefault ./themes/catppuccin-macchiato.yaml; base16Scheme = lib.mkDefault ./themes/catppuccin-macchiato.yaml;
polarity = config.lib.stylix.scheme.variant; polarity = config.lib.stylix.colors.variant;
opacity = { opacity = {
applications = 1.0; applications = 1.0;
terminal = 0.8125; # 0x0.D terminal = 0.8125; # 0x0.D

View file

@ -82,7 +82,7 @@
qt = { qt = {
enable = true; enable = true;
platformTheme = "gnome"; platformTheme = "gnome";
style = if config.lib.stylix.scheme.variant == "light" then "adwaita" else "adwaita-dark"; style = if config.lib.stylix.colors.variant == "light" then "adwaita" else "adwaita-dark";
}; };
services = { services = {
xserver.xkb.layout = "gb"; xserver.xkb.layout = "gb";
@ -163,10 +163,10 @@
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
iconTheme = { iconTheme = {
package = (pkgs.papirus-icon-theme.override { color = "violet"; }); package = (pkgs.papirus-icon-theme.override { color = "violet"; });
name = if config.lib.stylix.scheme.variant == "light" then "Papirus-Light" else "Papirus-Dark"; name = if config.lib.stylix.colors.variant == "light" then "Papirus-Light" else "Papirus-Dark";
}; };
}; };
stylix.targets.gtk.extraCss = with config.lib.stylix.scheme.withHashtag; '' stylix.targets.gtk.extraCss = with config.lib.stylix.colors.withHashtag; ''
@define-color accent_color ${base0E-hex}; @define-color accent_color ${base0E-hex};
@define-color accent_bg_color ${base0E-hex}; @define-color accent_bg_color ${base0E-hex};
''; '';
@ -197,18 +197,22 @@
"gtk-4.0/gtk.css".force = true; "gtk-4.0/gtk.css".force = true;
"gtk-4.0/settings.ini".force = true; "gtk-4.0/settings.ini".force = true;
# Set Swappy config so that it saves to Screenshots directory # Set Swappy config so that it saves to Screenshots directory
"swappy/config".text = '' "swappy/config".text =
[Default] let
save_dir=${config.xdg.userDirs.pictures}/Screenshots/ inherit (config.stylix) fonts;
save_filename_format=swappy-%Y%m%d-%H%M%S.png in
show_panel=false ''
line_size=5 [Default]
text_size=${toString config.stylix.fonts.sizes.desktop} save_dir=${config.xdg.userDirs.pictures}/Screenshots/
text_font=${config.stylix.fonts.sansSerif.name} save_filename_format=swappy-%Y%m%d-%H%M%S.png
paint_mode=brush show_panel=false
early_exit=false line_size=5
fill_shape=false text_size=${toString fonts.sizes.desktop}
''; text_font=${fonts.sansSerif.name}
paint_mode=brush
early_exit=false
fill_shape=false
'';
# Matplotlib default figure sizes and font settings # Matplotlib default figure sizes and font settings
"matplotlib/matplotlibrc".text = "matplotlib/matplotlibrc".text =
let let
@ -227,7 +231,7 @@
# WhatsApp config # WhatsApp config
"whatsapp-for-linux/settings.conf" = "whatsapp-for-linux/settings.conf" =
let let
inherit (config.lib.stylix.scheme) variant; inherit (config.lib.stylix.colors) variant;
in in
{ {
force = true; force = true;

View file

@ -6,9 +6,9 @@
image-opacity = lib.mkForce "1.0"; image-opacity = lib.mkForce "1.0";
border-color = border-color =
let let
scheme = config.lib.stylix.scheme; inherit (config.lib.stylix) colors;
in in
lib.mkForce "rgba(${scheme.base0E-rgb-r}, ${scheme.base0E-rgb-g}, ${scheme.base0E-rgb-b}, 1.0)"; lib.mkForce "rgba(${colors.base0E-rgb-r}, ${colors.base0E-rgb-g}, ${colors.base0E-rgb-b}, 1.0)";
}; };
}; };
} }

View file

@ -5,45 +5,43 @@
configFile = { configFile = {
"nyxt/config.lisp".text = "nyxt/config.lisp".text =
let let
inherit (config.lib.stylix.scheme) variant; inherit (config.lib.stylix) colors;
fonts = config.stylix.fonts; inherit (config.stylix) fonts;
scheme = config.lib.stylix.scheme.withHashtag;
accent = scheme.base0E;
in in
'' ''
;; Import custom configuration ;; Import custom configuration
(nyxt::load-lisp "${./config.lisp}") (nyxt::load-lisp "${./config.lisp}")
;; Set theme variant from GTK_THEME if available ;; Set theme variant from GTK_THEME if available
(setf (uiop/os:getenv "GTK_THEME") "Adwaita:${variant}") (setf (uiop/os:getenv "GTK_THEME") "Adwaita:${colors.variant}")
;; Define custom theme ;; Define custom theme
(define-configuration browser (define-configuration browser
((theme (make-instance 'theme:theme ((theme (make-instance 'theme:theme
:font-family "${fonts.sansSerif.name}" :font-family "${fonts.sansSerif.name}"
:monospace-font-family "${fonts.monospace.name}" :monospace-font-family "${fonts.monospace.name}"
:text-color "${scheme.base05}" :text-color "${colors.withHashtag.base05}"
:contrast-text-color "${scheme.base01}" :contrast-text-color "${colors.withHashtag.base01}"
:background-color "${scheme.base00}" :background-color "${colors.withHashtag.base00}"
:primary-color "${scheme.base04}" :primary-color "${colors.withHashtag.base04}"
:secondary-color "${scheme.base03}" :secondary-color "${colors.withHashtag.base03}"
:tertiary-color "${scheme.base02}" :tertiary-color "${colors.withHashtag.base02}"
:quaternary-color "${scheme.base02}" :quaternary-color "${colors.withHashtag.base02}"
:accent-color "${accent}" :accent-color "${colors.withHashtag.magenta}"
:action-color "${scheme.cyan}" :action-color "${colors.withHashtag.cyan}"
:success-color "${scheme.green}" :success-color "${colors.withHashtag.green}"
:warning-color "${scheme.yellow}" :warning-color "${colors.withHashtag.yellow}"
:highlight-color "${scheme.base04}" :highlight-color "${colors.withHashtag.base04}"
:codeblock-color "${scheme.base01}" :codeblock-color "${colors.withHashtag.base01}"
:on-background-color "${scheme.base05}" :on-background-color "${colors.withHashtag.base05}"
:on-primary-color "${scheme.base00}" :on-primary-color "${colors.withHashtag.base00}"
:on-secondary-color "${scheme.base01}" :on-secondary-color "${colors.withHashtag.base01}"
:on-tertiary-color "${scheme.base04}" :on-tertiary-color "${colors.withHashtag.base04}"
:on-quaternary-color "${scheme.base04}" :on-quaternary-color "${colors.withHashtag.base04}"
:on-accent-color "${scheme.base01}" :on-accent-color "${colors.withHashtag.base01}"
:on-action-color "${scheme.base01}" :on-action-color "${colors.withHashtag.base01}"
:on-success-color "${scheme.base01}" :on-success-color "${colors.withHashtag.base01}"
:on-warning-color "${scheme.base01}" :on-warning-color "${colors.withHashtag.base01}"
:on-highlight-color "${scheme.base01}" :on-highlight-color "${colors.withHashtag.base01}"
:on-codeblock-color "${scheme.base05}" :on-codeblock-color "${colors.withHashtag.base05}"
)))) ))))
''; '';
}; };

View file

@ -18,7 +18,7 @@
width = 2; width = 2;
radius = 10; radius = 10;
}; };
colors.border = lib.mkForce "${config.lib.stylix.scheme.base0E}ff"; colors.border = lib.mkForce "${config.lib.stylix.colors.magenta}ff";
}; };
}; };
} }

View file

@ -57,8 +57,8 @@
waybar.systemd.target = "hyprland-session.target"; waybar.systemd.target = "hyprland-session.target";
hyprlock = hyprlock =
let let
scheme = config.lib.stylix.scheme; inherit (config.lib.stylix) colors;
accent = scheme.base0E; accent = colors.magenta;
in in
{ {
enable = true; enable = true;
@ -81,7 +81,7 @@
{ {
monitor = ""; monitor = "";
size = "395, 185"; size = "395, 185";
color = "0xff${scheme.base00}"; color = "0xff${colors.base00}";
rounding = 10; rounding = 10;
border_size = 2; border_size = 2;
border_color = "0xff${accent}"; border_color = "0xff${accent}";
@ -98,7 +98,7 @@
{ {
monitor = ""; monitor = "";
text = "cmd[update:30000] echo \"$(date +\"%R\")\""; text = "cmd[update:30000] echo \"$(date +\"%R\")\"";
color = "0xff${scheme.base05}"; color = "0xff${colors.base05}";
font_size = 90; font_size = 90;
font_family = font; font_family = font;
position = "-30, 0"; position = "-30, 0";
@ -108,7 +108,7 @@
{ {
monitor = ""; monitor = "";
text = "cmd[update:43200000] echo \"$(date +\"%F\")\""; text = "cmd[update:43200000] echo \"$(date +\"%F\")\"";
color = "0xff${scheme.base05}"; color = "0xff${colors.base05}";
font_size = 25; font_size = 25;
font_family = font; font_family = font;
position = "-40, -150"; position = "-40, -150";
@ -136,12 +136,12 @@
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0 dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true; dots_center = true;
outer_color = "0xff${accent}"; outer_color = "0xff${accent}";
inner_color = "0xff${scheme.base00}"; inner_color = "0xff${colors.base00}";
font_color = "0xff${scheme.base05}"; font_color = "0xff${colors.base05}";
fade_on_empty = false; fade_on_empty = false;
placeholder_text = "󰌾 Logged in as <span foreground=\"##${accent}\">$USER</span>"; placeholder_text = "󰌾 Logged in as <span foreground=\"##${accent}\">$USER</span>";
check_color = "0xff${scheme.blue}"; check_color = "0xff${colors.blue}";
fail_color = "0xff${scheme.red}"; fail_color = "0xff${colors.red}";
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>"; fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
hide_input = false; hide_input = false;
position = "0, -50"; position = "0, -50";
@ -171,7 +171,7 @@
layout = "master"; layout = "master";
gaps_in = 3; gaps_in = 3;
gaps_out = 5; gaps_out = 5;
"col.active_border" = lib.mkForce "rgb(${config.lib.stylix.scheme.base0E})"; "col.active_border" = lib.mkForce "rgb(${config.lib.stylix.colors.base0E})";
}; };
master = { master = {
allow_small_split = true; allow_small_split = true;
@ -203,7 +203,7 @@
range = 4; range = 4;
render_power = 3; render_power = 3;
ignore_window = true; ignore_window = true;
color = lib.mkForce "rgba(${config.lib.stylix.scheme.base00}0d)"; color = lib.mkForce "rgba(${config.lib.stylix.colors.base00}0d)";
}; };
}; };
animations = { animations = {

View file

@ -12,7 +12,7 @@
iconPath = with config.gtk.iconTheme; "${package}/share/icons/${name}"; iconPath = with config.gtk.iconTheme; "${package}/share/icons/${name}";
borderRadius = 10; borderRadius = 10;
borderSize = 2; borderSize = 2;
borderColor = lib.mkForce config.lib.stylix.scheme.withHashtag.base0E; borderColor = lib.mkForce config.lib.stylix.colors.withHashtag.magenta;
defaultTimeout = (builtins.mul 5 1000); # 5s timeout defaultTimeout = (builtins.mul 5 1000); # 5s timeout
}; };
} }

View file

@ -116,7 +116,7 @@
settings = rec { settings = rec {
preset = if light_dark == "light" then "pansexual" else "transgender"; preset = if light_dark == "light" then "pansexual" else "transgender";
mode = "rgb"; mode = "rgb";
light_dark = config.lib.stylix.scheme.variant; light_dark = config.lib.stylix.colors.variant;
lightness = 0.4; lightness = 0.4;
color_align = { color_align = {
mode = "horizontal"; mode = "horizontal";

View file

@ -160,14 +160,14 @@
on-scroll = 1; on-scroll = 1;
format = format =
let let
scheme = config.lib.stylix.scheme.withHashtag; inherit (config.lib.stylix) colors;
in in
{ {
months = "<span color='${scheme.red}'><b>{}</b></span>"; months = "<span color='${colors.withHashtag.red}'><b>{}</b></span>";
weeks = "<span color='${scheme.cyan}'><i>W{}</i></span>"; weeks = "<span color='${colors.withHashtag.cyan}'><i>W{}</i></span>";
weekdays = "<span color='${scheme.orange}'><u>{}</u></span>"; weekdays = "<span color='${colors.withHashtag.orange}'><u>{}</u></span>";
days = "<span color='${scheme.base05}'>{}</span>"; days = "<span color='${colors.withHashtag.base05}'>{}</span>";
today = "<span color='${scheme.magenta}'><b><u>{}</u></b></span>"; today = "<span color='${colors.withHashtag.magenta}'><b><u>{}</u></b></span>";
}; };
}; };
actions = { actions = {
@ -260,14 +260,14 @@
}; };
style = style =
let let
scheme = config.lib.stylix.scheme.withHashtag; inherit (config.lib.stylix) colors;
opacity = config.stylix.opacity.desktop; inherit (config.stylix) fonts opacity;
in in
'' ''
* { * {
all: unset; all: unset;
font-family: ${config.stylix.fonts.monospace.name}; font-family: ${fonts.monospace.name};
font-size: ${toString config.stylix.fonts.sizes.desktop}pt; font-size: ${toString fonts.sizes.desktop}pt;
} }
window { window {
@ -277,93 +277,93 @@
} }
window > box { window > box {
color: ${scheme.base05}; color: ${colors.withHashtag.base05};
background: alpha(${scheme.base00}, ${toString opacity}); background: alpha(${colors.withHashtag.base00}, ${toString opacity.desktop});
margin: 5px 0px 5px 6px; margin: 5px 0px 5px 6px;
padding: 2px; padding: 2px;
border: 1px solid ${scheme.base04}; border: 1px solid ${colors.withHashtag.base04};
border-radius: 10px; border-radius: 10px;
} }
tooltip { tooltip {
background: ${scheme.base00}; background: ${colors.withHashtag.base00};
border: 2px solid ${scheme.base0E}; border: 2px solid ${colors.withHashtag.base0E};
border-radius: 10px; border-radius: 10px;
box-shadow: none; box-shadow: none;
padding: 10px; padding: 10px;
} }
tooltip label { tooltip label {
color: ${scheme.base05}; color: ${colors.withHashtag.base05};
border: none; border: none;
padding: 5px; padding: 5px;
margin: 0px; margin: 0px;
} }
#workspaces { #workspaces {
background: ${scheme.base00}; background: ${colors.withHashtag.base00};
border-radius: 5px; border-radius: 5px;
margin: 3px 2px; margin: 3px 2px;
padding: 2px 3px; padding: 2px 3px;
} }
#workspaces button.empty { #workspaces button.empty {
color: ${scheme.base03}; color: ${colors.withHashtag.base03};
} }
#workspaces button.active { #workspaces button.active {
color: ${scheme.base0E}; color: ${colors.withHashtag.base0E};
} }
#workspaces button.urgent { #workspaces button.urgent {
color: ${scheme.base09}; color: ${colors.withHashtag.base09};
} }
#mpris.paused { #mpris.paused {
color: ${scheme.base03}; color: ${colors.withHashtag.base03};
} }
#custom-notification { #custom-notification {
color: ${scheme.base08}; color: ${colors.withHashtag.base08};
} }
#pulseaudio.source { #pulseaudio.source {
color: ${scheme.base09}; color: ${colors.withHashtag.base09};
} }
#pulseaudio.sink { #pulseaudio.sink {
color: ${scheme.base0A}; color: ${colors.withHashtag.base0A};
} }
#network { #network {
color: ${scheme.base0B}; color: ${colors.withHashtag.base0B};
} }
#bluetooth { #bluetooth {
color: ${scheme.base0C}; color: ${colors.withHashtag.base0C};
} }
#custom-calendar-icon, #custom-calendar-icon,
#clock.calendar { #clock.calendar {
color: ${scheme.base0D}; color: ${colors.withHashtag.base0D};
} }
#custom-clock-icon, #custom-clock-icon,
#clock { #clock {
color: ${scheme.base0E}; color: ${colors.withHashtag.base0E};
} }
#backlight { #backlight {
color: ${scheme.base0F}; color: ${colors.withHashtag.base0F};
} }
#battery.warning { #battery.warning {
color: ${scheme.base09}; color: ${colors.withHashtag.base09};
} }
#battery.critical { #battery.critical {
color: ${scheme.base08}; color: ${colors.withHashtag.base08};
} }
#battery.charging, #battery.charging,
#battery.plugged { #battery.plugged {
color: ${scheme.base0B}; color: ${colors.withHashtag.base0B};
} }
#systemd-failed-units.ok { #systemd-failed-units.ok {
color: ${scheme.base0B} color: ${colors.withHashtag.base0B}
} }
#systemd-failed-units.degraded { #systemd-failed-units.degraded {
color: ${scheme.base08} color: ${colors.withHashtag.base08}
} }
#custom-weather, #custom-weather,

View file

@ -24,8 +24,8 @@
]; ];
style = style =
let let
scheme = config.lib.stylix.scheme; inherit (config.lib.stylix) colors;
opacity = config.stylix.opacity.popups; inherit (config.stylix) opacity;
icons = "${config.programs.wlogout.package}/share/wlogout/icons"; icons = "${config.programs.wlogout.package}/share/wlogout/icons";
in in
'' ''
@ -35,15 +35,15 @@
} }
window { window {
background-color: rgba(${scheme.base00-rgb-r}, ${scheme.base00-rgb-g}, ${scheme.base00-rgb-b}, ${toString opacity}); background-color: rgba(${colors.base00-rgb-r}, ${colors.base00-rgb-g}, ${colors.base00-rgb-b}, ${toString opacity.popups});
} }
button { button {
border-radius: 0; border-radius: 0;
border-color: ${scheme.withHashtag.base03}; border-color: ${colors.withHashtag.base03};
text-decoration-color: ${scheme.withHashtag.base05}; text-decoration-color: ${colors.withHashtag.base05};
color: ${scheme.withHashtag.base05}; color: ${colors.withHashtag.base05};
background-color: ${scheme.withHashtag.base00}; background-color: ${colors.withHashtag.base00};
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -52,9 +52,9 @@
} }
button:focus, button:active, button:hover { button:focus, button:active, button:hover {
text-decoration-color: ${scheme.withHashtag.base00}; text-decoration-color: ${colors.withHashtag.base00};
color: ${scheme.withHashtag.base00}; color: ${colors.withHashtag.base00};
background-color: ${scheme.withHashtag.base0E}; background-color: ${colors.withHashtag.magenta};
outline-style: none; outline-style: none;
} }