feat(helix): Catppuccin -> Rose Pine

This commit is contained in:
punkfairie 2024-10-19 23:02:44 -07:00
parent 09b2d0f6c4
commit 57afe4a40e
Signed by: punkfairie
GPG key ID: 01823C057725C266
2 changed files with 26 additions and 24 deletions

View file

@ -184,13 +184,13 @@
"type": "Git", "type": "Git",
"repository": { "repository": {
"type": "GitHub", "type": "GitHub",
"owner": "catppuccin", "owner": "rose-pine",
"repo": "helix" "repo": "helix"
}, },
"branch": "main", "branch": "main",
"revision": "7e468da5dbdd54c7504519499f82c4862af472fd", "revision": "15e1ff4ff7c59bf8d75d648d652112acb1efc412",
"url": "https://github.com/catppuccin/helix/archive/7e468da5dbdd54c7504519499f82c4862af472fd.tar.gz", "url": "https://github.com/rose-pine/helix/archive/15e1ff4ff7c59bf8d75d648d652112acb1efc412.tar.gz",
"hash": "0xwdvbjlhlkhcj7mjc954gfkm6a978a0xn64i7yy674pzs8x90xq" "hash": "1gmvjks39spz1lmv1b1f1jgpfjhsg603gc2dxs5hzj93vmlbl7ph"
}, },
"hyprland": { "hyprland": {
"type": "Git", "type": "Git",

View file

@ -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"; } // { config,
useItalics = lib.mkEnableOption "Italics in Catppuccin theme for Helix"; 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 { config = lib.mkIf enable {
programs.helix = programs.helix = {
let settings = {
subdir = if cfg.useItalics then "default" else "no_italics"; theme = themeName;
in editor.color-modes = lib.mkDefault true;
{
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";
}; };
themes."${themeName}" = lib.importTOML "${sources.helix}/${themeName}.toml";
};
}; };
} }