wry, many thing

This commit is contained in:
atagen 2026-04-08 11:43:10 +10:00
parent 6e62eccfba
commit 848ed62c5d
47 changed files with 1598 additions and 1201 deletions

View file

@ -13,12 +13,16 @@ let
theme = kitty-themes.parseTheme ./pal.conf;
in
{
options.rice = lib.mkOption {
description = "ricing related variables";
default = { };
type = lib.types.attrsOf lib.types.anything;
};
config.rice = rec {
# first, map straight colours
palette = theme // {
normal = {
black = theme.color0;
@ -51,5 +55,36 @@ in
hex = toRGBHex palette;
shortHex = toRGBShortHex palette;
};
# then map colours to roles
# these are general UI roles — not code-syntax tokens.
# editors and shells should use palette directly for syntax.
roles = p: {
# base
fg = p.util.fg;
bg = p.util.bg;
surface = p.normal.black; # panels, popups, recessed areas
overlay = p.bright.black; # menus, statuslines, elevated UI
muted = p.normal.white; # secondary text, inactive borders
# emphasis
primary = p.normal.red; # main interactive accent
secondary = p.bright.blue; # secondary interactive accent
accent = p.bright.magenta; # highlights, matches
highlight = p.bright.yellow; # selection, active borders, branding
# state
success = p.bright.green;
warning = p.normal.yellow;
error = p.bright.red;
info = p.bright.cyan;
hint = p.bright.blue;
# diff
added = p.normal.green;
changed = p.bright.yellow;
removed = p.normal.red;
};
};
}