feat(console): Catppuccin -> Rose Pine

This commit is contained in:
punkfairie 2024-10-20 16:29:43 -07:00
parent 3849b61657
commit c622a669d8
Signed by: punkfairie
GPG key ID: 01823C057725C266

View file

@ -1,34 +1,36 @@
{ config, lib, ... }:
let
inherit (config.catppuccin) sources;
cfg = config.console.catppuccin;
enable = cfg.enable && config.console.enable;
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors;
in
{ {
options.console.catppuccin = lib.ctp.mkCatppuccinOpt { name = "console"; }; config,
lib,
...
}: let
cfg = config.console.rose-pine;
enable = cfg.enable && config.console.enable;
palette = (lib.importJSON "../../.sources/palette.json").${cfg.flavor}.colors;
in {
options.console.rose-pine = lib.rp.mkRosePineOpt {name = "console";};
config.console.colors = lib.mkIf enable ( config.console.colors = lib.mkIf enable (
# Manually populate with colors from catppuccin/tty # Manually populate with colors from rose-pine/linux-tty
# Make sure to strip initial # from hex codes # Make sure to strip initial # from hex codes
map (color: (builtins.substring 1 6 palette.${color}.hex)) [ map (color: (builtins.substring 1 6 palette.${color}.hex)) [
"base" "base"
"red" "love"
"green" "foam"
"yellow" "gold"
"blue" "pine"
"pink" "iris"
"teal" "rose"
"subtext1" "text"
"surface2" "overlay"
"red" "love"
"green" "foam"
"yellow" "gold"
"blue" "pine"
"pink" "iris"
"teal" "rose"
"subtext0" "text"
] ]
); );
} }