kitty-themes based rice

This commit is contained in:
Filippo Berto 2022-12-31 00:14:35 +01:00
parent a0d460ca40
commit bd43302fd8
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
6 changed files with 196 additions and 67 deletions

162
flake.lock generated
View file

@ -74,6 +74,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1667395993,
@ -89,7 +105,44 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": {
"nixpkgs": [
"nix-rice",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"pre-commit-hooks", "pre-commit-hooks",
@ -134,26 +187,40 @@
"type": "github" "type": "github"
} }
}, },
"kitty-themes": {
"flake": false,
"locked": {
"lastModified": 1669518372,
"narHash": "sha256-PGV/iPg7nFW8RMEMJbt1oGcAzTaS3u6I+sCpIDrx7ic=",
"owner": "kovidgoyal",
"repo": "kitty-themes",
"rev": "4d309e984b81dd120d7a697abe4f817da6f3cfe5",
"type": "github"
},
"original": {
"owner": "kovidgoyal",
"repo": "kitty-themes",
"type": "github"
}
},
"nix-rice": { "nix-rice": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": "flake-utils_2",
"flake-utils" "kitty-themes": "kitty-themes",
], "nixpkgs-lib": "nixpkgs-lib",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1666602436, "lastModified": 1672440409,
"narHash": "sha256-1XqDIzbqBjJSCxx+r/qHYxRGJnaeBWMTNoOY1bEY+uc=", "narHash": "sha256-Bz+rXbFOsKmlnl33FJ9jQx27WQu0BPquRyZEfin4aQQ=",
"owner": "bertof", "owner": "bertof",
"repo": "nix-rice", "repo": "nix-rice",
"rev": "82ec325c24f35d628a41575819c4ae76a853a942", "rev": "265d5df8ccbe20a1fcc78d7e0d07eb1062ea570d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "bertof", "owner": "bertof",
"ref": "testing",
"repo": "nix-rice", "repo": "nix-rice",
"type": "github" "type": "github"
} }
@ -211,21 +278,52 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1670939335, "lastModified": 1671271357,
"narHash": "sha256-AJmruD+RI6smxiVnfpmNT7275mZsUdCS5zczeQCyy3o=", "narHash": "sha256-xRJdLbWK4v2SewmSStYrcLa0YGJpleufl44A19XSW8k=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8d6da33644bbd082b8a13f73ea2c7338190d7429", "rev": "40f79f003b6377bd2f4ed4027dde1f8f922995dd",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "release-22.11", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"lastModified": 1671929364,
"narHash": "sha256-N9GW06FZTKDpkv9YLMXswUxnX27b9qEtfTg7WsSdXjc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "a909f7a2fb4ec6d14d52b8a727bb9ba465e15766",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": {
"lastModified": 1671271954,
"narHash": "sha256-cSvu+bnvN08sOlTBWbBrKaBHQZq8mvk8bgpt0ZJ2Snc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d513b448cc2a6da2c8803e3c197c9fc7e67b19e3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1668984258, "lastModified": 1668984258,
"narHash": "sha256-0gDMJ2T3qf58xgcSbYoXiRGUkPWmKyr5C3vcathWhKs=", "narHash": "sha256-0gDMJ2T3qf58xgcSbYoXiRGUkPWmKyr5C3vcathWhKs=",
@ -257,23 +355,39 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1670939335,
"narHash": "sha256-AJmruD+RI6smxiVnfpmNT7275mZsUdCS5zczeQCyy3o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8d6da33644bbd082b8a13f73ea2c7338190d7429",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": [ "flake-utils": [
"nix-rice", "nix-rice",
"flake-utils" "flake-utils"
], ],
"nixpkgs": [ "gitignore": "gitignore",
"nix-rice", "nixpkgs": "nixpkgs",
"nixpkgs" "nixpkgs-stable": "nixpkgs-stable"
]
}, },
"locked": { "locked": {
"lastModified": 1666160137, "lastModified": 1672050129,
"narHash": "sha256-8bQu+6poMzUyS2n3C1v3hkO6ZhRzj8Pf3CDCNckqQE4=", "narHash": "sha256-GBQMcvJUSwAVOpDjVKzB6D5mmHI7Y4nFw+04bnS9QrM=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "e6c8efee1c108bb27522b9fd25b1cd0eb3288681", "rev": "67d98f02443b9928bc77f1267741dcfdd3d7b65c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -284,15 +398,15 @@
}, },
"pre-commit-hooks_2": { "pre-commit-hooks_2": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_3",
"flake-utils": [ "flake-utils": [
"flake-utils" "flake-utils"
], ],
"gitignore": "gitignore", "gitignore": "gitignore_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1670413394, "lastModified": 1670413394,
@ -317,7 +431,7 @@
"nix-rice": "nix-rice", "nix-rice": "nix-rice",
"nixos-generators": "nixos-generators", "nixos-generators": "nixos-generators",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"nixpkgs-u": "nixpkgs-u", "nixpkgs-u": "nixpkgs-u",
"pre-commit-hooks": "pre-commit-hooks_2", "pre-commit-hooks": "pre-commit-hooks_2",
"tex2nix": "tex2nix" "tex2nix": "tex2nix"

View file

@ -11,7 +11,7 @@
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
nixos-generators = { url = "github:nix-community/nixos-generators"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; nixos-generators = { url = "github:nix-community/nixos-generators"; inputs = { nixpkgs.follows = "nixpkgs"; }; };
nixos-hardware.url = "github:NixOS/nixos-hardware"; nixos-hardware.url = "github:NixOS/nixos-hardware";
nix-rice = { url = "github:bertof/nix-rice"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; }; nix-rice = { url = "github:bertof/nix-rice/testing"; };
pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; }; pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; };
tex2nix = { url = "github:Mic92/tex2nix"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; }; tex2nix = { url = "github:Mic92/tex2nix"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; };
}; };

View file

@ -40,7 +40,7 @@ in
package = pkgs.unstable.helix; package = pkgs.unstable.helix;
languages = [ ]; languages = [ ];
settings = { settings = {
theme = "ayu_mirage"; theme = "evergreen_dark";
editor.lsp.display-messages = true; editor.lsp.display-messages = true;
editor.scrolloff = 5; editor.scrolloff = 5;
editor.true-color = true; editor.true-color = true;

View file

@ -1,25 +1,27 @@
{ pkgs, ... }: { pkgs, ... }:
let let
strPalette = with pkgs.rice; strPalette = with pkgs.rice; pkgs.lib.rice.palette.toRgbHex {
pkgs.lib.rice.palette.toRgbHex rec { inherit (colorPalette)
inherit (colorPalette.primary) background foreground; background
color0 = colorPalette.normal.black; foreground
color1 = colorPalette.normal.red; color0
color2 = colorPalette.normal.green; color1
color3 = colorPalette.normal.yellow; color2
color4 = colorPalette.normal.blue; color3
color5 = colorPalette.normal.magenta; color4
color6 = colorPalette.normal.cyan; color5
color7 = colorPalette.normal.white; color6
color8 = colorPalette.bright.black; color7
color9 = colorPalette.bright.red; color8
color10 = colorPalette.bright.green; color9
color11 = colorPalette.bright.yellow; color10
color12 = colorPalette.bright.blue; color11
color13 = colorPalette.bright.magenta; color12
color14 = colorPalette.bright.cyan; color13
color15 = colorPalette.bright.white; color14
}; color15
;
};
in in
{ {
programs.kitty = { programs.kitty = {

View file

@ -33,20 +33,20 @@ let
palette.toARGBHex rec { palette.toARGBHex rec {
normal = { normal = {
foreground = colorPalette.normal.white; foreground = color.darken 10 colorPalette.foreground;
background = color.setAlphaRgba alpha colorPalette.normal.black; background = color.setAlphaRgba alpha colorPalette.background;
underline = colorPalette.dark.blue; underline = colorPalette.normal.blue;
}; };
active = { active = {
foreground = colorPalette.bright.white; inherit (colorPalette) foreground;
background = color.setAlphaRgba alpha colorPalette.normal.black; background = color.setAlphaRgba alpha colorPalette.background;
underline = colorPalette.normal.yellow; underline = colorPalette.normal.yellow;
}; };
selected = { selected = {
foreground = colorPalette.bright.white; inherit (colorPalette) foreground;
background = color.setAlphaRgba alpha (color.brighten 10 colorPalette.bright.black); background = color.setAlphaRgba alpha colorPalette.background;
underline = colorPalette.bright.red; underline = colorPalette.bright.red;
}; };
@ -193,12 +193,12 @@ in
}; };
in in
{ {
focused = recursiveUpdate colors.selected common; focused = recursiveUpdate common colors.selected;
occupied = recursiveUpdate colors.active common; occupied = recursiveUpdate common colors.active;
urgent = recursiveUpdate (recursiveUpdate colors.active common) { urgent = recursiveUpdate (recursiveUpdate common colors.active) {
background = colors.alert; background = colors.alert;
}; };
empty = recursiveUpdate (recursiveUpdate colors.normal common) { empty = recursiveUpdate (recursiveUpdate common colors.normal) {
# text = "⏺"; # text = "⏺";
padding = 1; padding = 1;
}; };

View file

@ -6,26 +6,39 @@ let
# mkpm = with prev.lib.rice; palette.tPalette color.hexToRgba (import ./themes/monokai-pro-machine.nix); # mkpm = with prev.lib.rice; palette.tPalette color.hexToRgba (import ./themes/monokai-pro-machine.nix);
# bloom = with prev.lib.rice; # bloom = with prev.lib.rice;
# palette.tPalette color.hexToRgba (import ./themes/bloom.nix); # palette.tPalette color.hexToRgba (import ./themes/bloom.nix);
ayu-mirage = with super.lib.rice; theme = with super.lib.rice;
palette.tPalette color.hexToRgba (import ./themes/ayu-mirage.nix); kitty-themes.getThemeByName "everforest_dark_medium";
in in
rec { rec {
rice = { rice = {
colorPalette = with super.lib.rice; rec { colorPalette = with super.lib.rice; rec {
normal = palette.defaultPalette // { normal = palette.defaultPalette // {
inherit (ayu-mirage.normal) black red green yellow blue magenta cyan white; black = theme.color0;
red = theme.color1;
green = theme.color2;
yellow = theme.color0;
blue = theme.color4;
magenta = theme.color5;
cyan = theme.color6;
white = theme.color7;
}; };
bright = palette.brighten 10 normal // { bright = palette.brighten 10 normal // {
inherit (ayu-mirage.bright) black red green yellow blue magenta cyan white; black = theme.color8;
red = theme.color9;
green = theme.color10;
yellow = theme.color11;
blue = theme.color12;
magenta = theme.color13;
cyan = theme.color14;
white = theme.color15;
}; };
dark = palette.darken 10 normal; dark = palette.darken 10 normal;
primary = { primary = {
background = color.black; inherit (theme) background foreground;
foreground = color.white; bright_foreground = color.brighten 10 theme.foreground;
bright_foreground = color.white; dim_foreground = color.darken 10 theme.foreground;
dim_foreground = dark.white; };
} // ayu-mirage.primary; } // theme;
};
font = { font = {
normal = { normal = {
name = "Cantarell"; name = "Cantarell";