mirror of
https://github.com/RGBCube/ThemeNix
synced 2025-07-28 00:47:44 +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
56
README.md
56
README.md
|
@ -279,9 +279,6 @@ let
|
|||
in {}
|
||||
```
|
||||
|
||||
If you don't want to use the base16 color names,
|
||||
there are also aliases that point to the base16 color.
|
||||
|
||||
Themes also have templates, which generate templates with the color scheme.
|
||||
You can use a template by doing `themes.gruvboxbox-dark-hard.<template-name>`.
|
||||
|
||||
|
@ -290,58 +287,7 @@ You can use a template by doing `themes.gruvboxbox-dark-hard.<template-name>`.
|
|||
|
||||
```
|
||||
tmTheme
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>All aliases</summary>
|
||||
|
||||
```nix
|
||||
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;
|
||||
adwaitaGtkCss
|
||||
```
|
||||
</details>
|
||||
|
||||
|
|
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);
|
||||
}
|
||||
|
|
90
templates/adwaita-gtk-css.nix
Normal file
90
templates/adwaita-gtk-css.nix
Normal file
|
@ -0,0 +1,90 @@
|
|||
theme: with theme.withHashtag; ''
|
||||
@define-color accent_color ${base0A};
|
||||
@define-color accent_bg_color ${base0A};
|
||||
@define-color accent_fg_color ${base00};
|
||||
@define-color destructive_color ${base08};
|
||||
@define-color destructive_bg_color ${base08};
|
||||
@define-color destructive_fg_color ${base00};
|
||||
@define-color success_color ${base0B};
|
||||
@define-color success_bg_color ${base0B};
|
||||
@define-color success_fg_color ${base00};
|
||||
@define-color warning_color ${base0E};
|
||||
@define-color warning_bg_color ${base0E};
|
||||
@define-color warning_fg_color ${base00};
|
||||
@define-color error_color ${base08};
|
||||
@define-color error_bg_color ${base08};
|
||||
@define-color error_fg_color ${base00};
|
||||
@define-color window_bg_color ${base00};
|
||||
@define-color window_fg_color ${base05};
|
||||
@define-color view_bg_color ${base00};
|
||||
@define-color view_fg_color ${base05};
|
||||
@define-color headerbar_bg_color ${base01};
|
||||
@define-color headerbar_fg_color ${base05};
|
||||
@define-color headerbar_border_color ${base01}B4;
|
||||
@define-color headerbar_backdrop_color @window_bg_color;
|
||||
@define-color headerbar_shade_color rgba(0, 0, 0, 0.07);
|
||||
@define-color headerbar_darker_shade_color rgba(0, 0, 0, 0.07);
|
||||
@define-color sidebar_bg_color ${base01};
|
||||
@define-color sidebar_fg_color ${base05};
|
||||
@define-color sidebar_backdrop_color @window_bg_color;
|
||||
@define-color sidebar_shade_color rgba(0, 0, 0, 0.07);
|
||||
@define-color secondary_sidebar_bg_color @sidebar_bg_color;
|
||||
@define-color secondary_sidebar_fg_color @sidebar_fg_color;
|
||||
@define-color secondary_sidebar_backdrop_color @sidebar_backdrop_color;
|
||||
@define-color secondary_sidebar_shade_color @sidebar_shade_color;
|
||||
@define-color card_bg_color ${base01};
|
||||
@define-color card_fg_color ${base05};
|
||||
@define-color card_shade_color rgba(0, 0, 0, 0.07);
|
||||
@define-color dialog_bg_color ${base01};
|
||||
@define-color dialog_fg_color ${base05};
|
||||
@define-color popover_bg_color ${base01};
|
||||
@define-color popover_fg_color ${base05};
|
||||
@define-color popover_shade_color rgba(0, 0, 0, 0.07);
|
||||
@define-color shade_color rgba(0, 0, 0, 0.07);
|
||||
@define-color scrollbar_outline_color ${base02};
|
||||
@define-color blue_1 ${base0D};
|
||||
@define-color blue_2 ${base0D};
|
||||
@define-color blue_3 ${base0D};
|
||||
@define-color blue_4 ${base0D};
|
||||
@define-color blue_5 ${base0D};
|
||||
@define-color green_1 ${base0B};
|
||||
@define-color green_2 ${base0B};
|
||||
@define-color green_3 ${base0B};
|
||||
@define-color green_4 ${base0B};
|
||||
@define-color green_5 ${base0B};
|
||||
@define-color yellow_1 ${base0A};
|
||||
@define-color yellow_2 ${base0A};
|
||||
@define-color yellow_3 ${base0A};
|
||||
@define-color yellow_4 ${base0A};
|
||||
@define-color yellow_5 ${base0A};
|
||||
@define-color orange_1 ${base09};
|
||||
@define-color orange_2 ${base09};
|
||||
@define-color orange_3 ${base09};
|
||||
@define-color orange_4 ${base09};
|
||||
@define-color orange_5 ${base09};
|
||||
@define-color red_1 ${base08};
|
||||
@define-color red_2 ${base08};
|
||||
@define-color red_3 ${base08};
|
||||
@define-color red_4 ${base08};
|
||||
@define-color red_5 ${base08};
|
||||
@define-color purple_1 ${base0E};
|
||||
@define-color purple_2 ${base0E};
|
||||
@define-color purple_3 ${base0E};
|
||||
@define-color purple_4 ${base0E};
|
||||
@define-color purple_5 ${base0E};
|
||||
@define-color brown_1 ${base0F};
|
||||
@define-color brown_2 ${base0F};
|
||||
@define-color brown_3 ${base0F};
|
||||
@define-color brown_4 ${base0F};
|
||||
@define-color brown_5 ${base0F};
|
||||
@define-color light_1 ${base01};
|
||||
@define-color light_2 ${base01};
|
||||
@define-color light_3 ${base01};
|
||||
@define-color light_4 ${base01};
|
||||
@define-color light_5 ${base01};
|
||||
@define-color dark_1 ${base01};
|
||||
@define-color dark_2 ${base01};
|
||||
@define-color dark_3 ${base01};
|
||||
@define-color dark_4 ${base01};
|
||||
@define-color dark_5 ${base01};
|
||||
''
|
Loading…
Add table
Add a link
Reference in a new issue