refactor rice into config
This commit is contained in:
parent
8872a12d20
commit
e4b7d76769
64 changed files with 225 additions and 230 deletions
55
common/rice/default.nix
Normal file
55
common/rice/default.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
nix-rice = import "${inputs.nix-rice}/lib.nix" {
|
||||
inherit lib;
|
||||
kitty-themes-src = { };
|
||||
};
|
||||
inherit (nix-rice) kitty-themes;
|
||||
inherit (nix-rice.palette) toRGBShortHex toRGBHex;
|
||||
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 {
|
||||
palette = theme // {
|
||||
normal = {
|
||||
black = theme.color0;
|
||||
red = theme.color1;
|
||||
green = theme.color2;
|
||||
yellow = theme.color3;
|
||||
blue = theme.color4;
|
||||
magenta = theme.color5;
|
||||
cyan = theme.color6;
|
||||
white = theme.color7;
|
||||
};
|
||||
bright = {
|
||||
black = theme.color8;
|
||||
red = theme.color9;
|
||||
green = theme.color10;
|
||||
yellow = theme.color11;
|
||||
blue = theme.color12;
|
||||
magenta = theme.color13;
|
||||
cyan = theme.color14;
|
||||
white = theme.color15;
|
||||
};
|
||||
util = {
|
||||
fg = theme.foreground;
|
||||
bg = theme.background;
|
||||
fg_sel = theme.selection_foreground;
|
||||
bg_sel = theme.selection_background;
|
||||
inherit (theme) cursor;
|
||||
# url = theme.url_color;
|
||||
};
|
||||
hex = toRGBHex palette;
|
||||
shortHex = toRGBShortHex palette;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue