nixfmt
This commit is contained in:
@@ -3,19 +3,23 @@ with lib;
|
||||
let
|
||||
cfg = config.mjallen.theme;
|
||||
|
||||
mkPalettePath = name:
|
||||
lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/${name}.nix";
|
||||
mkPalettePath = name: lib.snowfall.fs.get-file "modules/home/desktop/theme/palettes/${name}.nix";
|
||||
|
||||
cap = s: let
|
||||
len = builtins.stringLength s;
|
||||
in
|
||||
(lib.toUpper (builtins.substring 0 1 s))
|
||||
+ (builtins.substring 1 (len - 1) s);
|
||||
cap =
|
||||
s:
|
||||
let
|
||||
len = builtins.stringLength s;
|
||||
in
|
||||
(lib.toUpper (builtins.substring 0 1 s)) + (builtins.substring 1 (len - 1) s);
|
||||
in
|
||||
{
|
||||
options.mjallen.theme = {
|
||||
name = mkOption {
|
||||
type = types.enum [ "nord" "dracula" "everforest" ];
|
||||
type = types.enum [
|
||||
"nord"
|
||||
"dracula"
|
||||
"everforest"
|
||||
];
|
||||
default = "nord";
|
||||
description = "Global theme palette name.";
|
||||
};
|
||||
@@ -51,25 +55,47 @@ in
|
||||
|
||||
# e.g. Colloid-Dark-Compact-*
|
||||
color = mkOption {
|
||||
type = types.enum [ "dark" "light" ];
|
||||
type = types.enum [
|
||||
"dark"
|
||||
"light"
|
||||
];
|
||||
default = "dark";
|
||||
description = "GTK color variant.";
|
||||
};
|
||||
|
||||
size = mkOption {
|
||||
type = types.enum [ "standard" "compact" ];
|
||||
type = types.enum [
|
||||
"standard"
|
||||
"compact"
|
||||
];
|
||||
default = "compact";
|
||||
description = "GTK size variant.";
|
||||
};
|
||||
|
||||
accent = mkOption {
|
||||
type = types.enum [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ];
|
||||
type = types.enum [
|
||||
"default"
|
||||
"purple"
|
||||
"pink"
|
||||
"red"
|
||||
"orange"
|
||||
"yellow"
|
||||
"green"
|
||||
"teal"
|
||||
"grey"
|
||||
"all"
|
||||
];
|
||||
default = "all";
|
||||
description = "GTK accent (Colloid themeVariants).";
|
||||
};
|
||||
|
||||
tweak = mkOption {
|
||||
type = types.enum [ "normal" "rimless" "float" "black" ];
|
||||
type = types.enum [
|
||||
"normal"
|
||||
"rimless"
|
||||
"float"
|
||||
"black"
|
||||
];
|
||||
default = "normal";
|
||||
description = "GTK tweak (Colloid tweaks).";
|
||||
};
|
||||
@@ -84,13 +110,31 @@ in
|
||||
icons = {
|
||||
# Colloid icon scheme usually supports several named schemes. Default follows palette name.
|
||||
scheme = mkOption {
|
||||
type = types.enum [ "default" "nord" "dracula" "gruvbox" "everforest" "catppuccin" ];
|
||||
type = types.enum [
|
||||
"default"
|
||||
"nord"
|
||||
"dracula"
|
||||
"gruvbox"
|
||||
"everforest"
|
||||
"catppuccin"
|
||||
];
|
||||
default = cfg.name;
|
||||
description = "Icon scheme to use (Colloid schemeVariants).";
|
||||
};
|
||||
|
||||
variant = mkOption {
|
||||
type = types.enum [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all" ];
|
||||
type = types.enum [
|
||||
"default"
|
||||
"purple"
|
||||
"pink"
|
||||
"red"
|
||||
"orange"
|
||||
"yellow"
|
||||
"green"
|
||||
"teal"
|
||||
"grey"
|
||||
"all"
|
||||
];
|
||||
default = "all";
|
||||
description = "Icon variant (Colloid colorVariants).";
|
||||
};
|
||||
@@ -110,7 +154,10 @@ in
|
||||
|
||||
# Pull tokens directly from the palette file for convenience
|
||||
mjallen.theme.tokens = mkDefault (
|
||||
let pal = import cfg.paletteFile; in pal.tokens or { }
|
||||
let
|
||||
pal = import cfg.paletteFile;
|
||||
in
|
||||
pal.tokens or { }
|
||||
);
|
||||
|
||||
# Expose the imported palette for convenience
|
||||
@@ -129,12 +176,16 @@ in
|
||||
# Computed GTK/Icon theme names if not overridden
|
||||
_module.args.mjallenThemeComputed = {
|
||||
gtkTheme =
|
||||
if cfg.gtk.themeName != null then cfg.gtk.themeName
|
||||
else "Colloid-${cap cfg.gtk.color}-${cap cfg.gtk.size}";
|
||||
if cfg.gtk.themeName != null then
|
||||
cfg.gtk.themeName
|
||||
else
|
||||
"Colloid-${cap cfg.gtk.color}-${cap cfg.gtk.size}";
|
||||
|
||||
iconTheme =
|
||||
if cfg.icons.themeName != null then cfg.icons.themeName
|
||||
else "Colloid-${cap cfg.icons.scheme}-${cap cfg.gtk.color}";
|
||||
if cfg.icons.themeName != null then
|
||||
cfg.icons.themeName
|
||||
else
|
||||
"Colloid-${cap cfg.icons.scheme}-${cap cfg.gtk.color}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,11 +11,11 @@ rec {
|
||||
textMuted = "#e2e2dc";
|
||||
|
||||
primary = "#6272a4"; # dark blue
|
||||
info = "#8be9fd"; # cyan
|
||||
accent = "#bd93f9"; # purple
|
||||
info = "#8be9fd"; # cyan
|
||||
accent = "#bd93f9"; # purple
|
||||
success = "#50fa7b"; # green
|
||||
warning = "#f1fa8c"; # yellow
|
||||
danger = "#ff5555"; # red
|
||||
danger = "#ff5555"; # red
|
||||
};
|
||||
|
||||
# Shared styling tokens for CSS consumers
|
||||
|
||||
@@ -11,11 +11,11 @@ rec {
|
||||
textMuted = "#9da9a0";
|
||||
|
||||
primary = "#7fbbb3"; # blue/aqua
|
||||
info = "#83c092"; # teal
|
||||
accent = "#d699b6"; # magenta
|
||||
info = "#83c092"; # teal
|
||||
accent = "#d699b6"; # magenta
|
||||
success = "#a7c080"; # green
|
||||
warning = "#dbbc7f"; # yellow
|
||||
danger = "#e67e80"; # red
|
||||
danger = "#e67e80"; # red
|
||||
};
|
||||
|
||||
# Shared styling tokens for CSS consumers
|
||||
|
||||
@@ -11,11 +11,11 @@ rec {
|
||||
textMuted = "#e5e9f0";
|
||||
|
||||
primary = "#5e81ac"; # blue
|
||||
info = "#88c0d0"; # cyan/teal
|
||||
accent = "#b48ead"; # purple
|
||||
info = "#88c0d0"; # cyan/teal
|
||||
accent = "#b48ead"; # purple
|
||||
success = "#a3be8c"; # green
|
||||
warning = "#ebcb8b"; # yellow
|
||||
danger = "#bf616a"; # red
|
||||
danger = "#bf616a"; # red
|
||||
};
|
||||
|
||||
# Shared styling tokens for CSS consumers
|
||||
|
||||
Reference in New Issue
Block a user