feat(helix): Catppuccin -> Rose Pine
This commit is contained in:
parent
09b2d0f6c4
commit
57afe4a40e
2 changed files with 26 additions and 24 deletions
|
@ -184,13 +184,13 @@
|
|||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "catppuccin",
|
||||
"owner": "rose-pine",
|
||||
"repo": "helix"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "7e468da5dbdd54c7504519499f82c4862af472fd",
|
||||
"url": "https://github.com/catppuccin/helix/archive/7e468da5dbdd54c7504519499f82c4862af472fd.tar.gz",
|
||||
"hash": "0xwdvbjlhlkhcj7mjc954gfkm6a978a0xn64i7yy674pzs8x90xq"
|
||||
"revision": "15e1ff4ff7c59bf8d75d648d652112acb1efc412",
|
||||
"url": "https://github.com/rose-pine/helix/archive/15e1ff4ff7c59bf8d75d648d652112acb1efc412.tar.gz",
|
||||
"hash": "1gmvjks39spz1lmv1b1f1jgpfjhsg603gc2dxs5hzj93vmlbl7ph"
|
||||
},
|
||||
"hyprland": {
|
||||
"type": "Git",
|
||||
|
|
|
@ -1,26 +1,28 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (config.catppuccin) sources;
|
||||
cfg = config.programs.helix.catppuccin;
|
||||
enable = cfg.enable && config.programs.helix.enable;
|
||||
in
|
||||
{
|
||||
options.programs.helix.catppuccin = lib.ctp.mkCatppuccinOpt { name = "helix"; } // {
|
||||
useItalics = lib.mkEnableOption "Italics in Catppuccin theme for Helix";
|
||||
};
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.helix.rose-pine;
|
||||
enable = cfg.enable && config.programs.helix.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose_pine"
|
||||
else "rose_pine_${cfg.flavor}";
|
||||
in {
|
||||
options.programs.helix.rose-pine = lib.rp.mkRosePineOpt {name = "helix";};
|
||||
|
||||
config = lib.mkIf enable {
|
||||
programs.helix =
|
||||
let
|
||||
subdir = if cfg.useItalics then "default" else "no_italics";
|
||||
in
|
||||
{
|
||||
settings = {
|
||||
theme = "catppuccin-${cfg.flavor}";
|
||||
editor.color-modes = lib.mkDefault true;
|
||||
};
|
||||
|
||||
themes."catppuccin-${cfg.flavor}" = lib.importTOML "${sources.helix}/themes/${subdir}/catppuccin_${cfg.flavor}.toml";
|
||||
programs.helix = {
|
||||
settings = {
|
||||
theme = themeName;
|
||||
editor.color-modes = lib.mkDefault true;
|
||||
};
|
||||
|
||||
themes."${themeName}" = lib.importTOML "${sources.helix}/${themeName}.toml";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue