mirror of
https://github.com/RGBCube/ThemeNix
synced 2025-07-28 17:07:46 +00:00
Simplify flake & add adwaita gtk css
This commit is contained in:
parent
d4db43bc8c
commit
1e26b6249d
3 changed files with 103 additions and 120 deletions
77
flake.nix
77
flake.nix
|
@ -1,70 +1,17 @@
|
|||
{
|
||||
description = "Theme your NixOS configuration consistently.";
|
||||
|
||||
outputs = { self }: builtins.mapAttrs (slug: theme: let
|
||||
themeDescriptiveNames = with theme; {
|
||||
background = base00;
|
||||
lighterBackground = base01;
|
||||
selectionBackground = base02;
|
||||
comment = base03;
|
||||
invisible = base03;
|
||||
lineHighlight = base03;
|
||||
darkForeground = base04;
|
||||
defaultForeground = base05;
|
||||
caret = base05;
|
||||
delimiter = base05;
|
||||
operator = base05;
|
||||
lightForeground = base06;
|
||||
lightBackground = base07;
|
||||
variable = base08;
|
||||
xmlTag = base08;
|
||||
markupLinkText = base08;
|
||||
markupList = base08;
|
||||
diffDeleted = base08;
|
||||
integer = base09;
|
||||
boolean = base09;
|
||||
constant = base09;
|
||||
xmlAttributes = base09;
|
||||
markupLinkUrl = base09;
|
||||
classes = base0A;
|
||||
markupBold = base0A;
|
||||
searchTextBackground = base0A;
|
||||
strings = base0B;
|
||||
inheritedClass = base0B;
|
||||
markupCode = base0B;
|
||||
diffInserted = base0B;
|
||||
support = base0C;
|
||||
regularExpression = base0C;
|
||||
escapeCharacter = base0C;
|
||||
markupQuote = base0C;
|
||||
function = base0D;
|
||||
method = base0D;
|
||||
attributeId = base0D;
|
||||
heading = base0D;
|
||||
keyword = base0E;
|
||||
storage = base0E;
|
||||
selector = base0E;
|
||||
markupItalic = base0E;
|
||||
diffChanged = base0E;
|
||||
deprecated = base0F;
|
||||
openingClosingEmbeddedLanguageTag = base0F;
|
||||
outputs = { self }: {
|
||||
custom = theme: let
|
||||
onlyColors = builtins.removeAttrs theme [ "name" "author" ];
|
||||
|
||||
with0x = theme // (builtins.mapAttrs (_: value: "0x" + value) onlyColors);
|
||||
withHashtag = theme // (builtins.mapAttrs (_: value: "#" + value) onlyColors);
|
||||
in theme // {
|
||||
inherit with0x withHashtag;
|
||||
|
||||
tmTheme = (import ./templates/tmTheme.nix) theme;
|
||||
adwaitaGtkcss = (import ./templates/adwaitaGtkCss.nix) theme;
|
||||
};
|
||||
|
||||
themeWithSlug = theme // {
|
||||
inherit slug;
|
||||
};
|
||||
|
||||
enrichedTheme = themeWithSlug // themeDescriptiveNames;
|
||||
|
||||
enrichedThemeOnlyColors = builtins.removeAttrs enrichedTheme [ "name" "author" "slug" ];
|
||||
|
||||
enrichedThemeHelpers = {
|
||||
with0x = enrichedTheme // (builtins.mapAttrs (_: value: "0x" + value) enrichedThemeOnlyColors);
|
||||
withHashtag = enrichedTheme // (builtins.mapAttrs (_: value: "#" + value) enrichedThemeOnlyColors);
|
||||
};
|
||||
|
||||
templates = {
|
||||
tmTheme = (import ./templates/tmTheme.nix) (enrichedTheme // enrichedThemeHelpers);
|
||||
};
|
||||
in enrichedTheme // enrichedThemeHelpers // templates) (import ./themes.nix);
|
||||
} // builtins.mapAttrs (_: self.custom) (import ./themes.nix);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue