From 86f95ab8ebf2f59b14758c7f259b6f09ead3541a Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Sat, 28 Sep 2024 16:54:39 +0200 Subject: [PATCH] kakoune: add back themes --- packages/common/nki-kakoune/default.nix | 4 +- packages/common/nki-kakoune/themes.nix | 9 +++ .../nki-kakoune/themes/catppuccin-latte.kak | 79 +++++++++++++++++++ 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 packages/common/nki-kakoune/themes.nix create mode 100644 packages/common/nki-kakoune/themes/catppuccin-latte.kak diff --git a/packages/common/nki-kakoune/default.nix b/packages/common/nki-kakoune/default.nix index 53622ec..2c6a83d 100644 --- a/packages/common/nki-kakoune/default.nix +++ b/packages/common/nki-kakoune/default.nix @@ -1,5 +1,7 @@ { callPackage, kakoune, ... }: kakoune.override { - plugins = (callPackage ./plugins.nix { }) ++ [ + plugins = callPackage ./plugins.nix { } + ++ callPackage ./themes.nix { } + ++ [ ./kaktex ]; } diff --git a/packages/common/nki-kakoune/themes.nix b/packages/common/nki-kakoune/themes.nix new file mode 100644 index 0000000..5be9a6d --- /dev/null +++ b/packages/common/nki-kakoune/themes.nix @@ -0,0 +1,9 @@ +{ writeScriptDir, ... }: +let + themes = [ + { name = "catppuccin-latte"; src = ./themes/catppucin-latte.kak; } + ]; + + themeToColorscheme = name: src: writeScriptDir "share/kak/colors/${name}.kak" (builtins.readFile src); +in +builtins.map themeToColorscheme themes diff --git a/packages/common/nki-kakoune/themes/catppuccin-latte.kak b/packages/common/nki-kakoune/themes/catppuccin-latte.kak new file mode 100644 index 0000000..bd40ead --- /dev/null +++ b/packages/common/nki-kakoune/themes/catppuccin-latte.kak @@ -0,0 +1,79 @@ +# Catppuccin theme for Kakoune + +declare-option str rosewater "rgb:dc8a78" +declare-option str flamingo "rgb:dd7878" +declare-option str pink "rgb:ea76cb" +declare-option str mauve "rgb:8839ef" +declare-option str red "rgb:d20f39" +declare-option str maroon "rgb:e64553" +declare-option str peach "rgb:fe640b" +declare-option str yellow "rgb:df8e1d" +declare-option str green "rgb:40a02b" +declare-option str teal "rgb:179299" +declare-option str sky "rgb:04a5e5" +declare-option str sapphire "rgb:209fb5" +declare-option str blue "rgb:1e66f5" +declare-option str lavender "rgb:7287fd" +declare-option str text "rgb:4c4f69" +declare-option str subtext1 "rgb:5c5f77" +declare-option str subtext0 "rgb:6c6f85" +declare-option str overlay2 "rgb:7c7f93" +declare-option str overlay1 "rgb:8c8fa1" +declare-option str overlay0 "rgb:9ca0b0" +declare-option str surface2 "rgb:acb0be" +declare-option str surface1 "rgb:bcc0cc" +declare-option str surface0 "rgb:ccd0da" +declare-option str base "rgb:eff1f5" +declare-option str mantle "rgb:e6e9ef" +declare-option str crust "rgb:dce0e8" + + +set-face global title "%opt{text}+b" +set-face global header "%opt{subtext0}+b" +set-face global bold "%opt{maroon}+b" +set-face global italic "%opt{maroon}+i" +set-face global mono "%opt{green}" +set-face global block "%opt{sapphire}" +set-face global link "%opt{blue}" +set-face global bullet "%opt{peach}" +set-face global list "%opt{peach}" + +set-face global Default "%opt{text},%opt{base}" +set-face global PrimarySelection "%opt{text},%opt{surface2}" +set-face global SecondarySelection "%opt{text},%opt{surface2}" +set-face global PrimaryCursor "%opt{crust},%opt{rosewater}" +set-face global SecondaryCursor "%opt{text},%opt{overlay0}" +set-face global PrimaryCursorEol "%opt{surface2},%opt{lavender}" +set-face global SecondaryCursorEol "%opt{surface2},%opt{overlay1}" +set-face global LineNumbers "%opt{overlay1},%opt{base}" +set-face global LineNumberCursor "%opt{rosewater},%opt{surface2}+b" +set-face global LineNumbersWrapped "%opt{rosewater},%opt{surface2}+i" +set-face global MenuForeground "%opt{text},%opt{surface1}+b" +set-face global MenuBackground "%opt{text},%opt{surface0}" +set-face global MenuInfo "%opt{crust},%opt{teal}" +set-face global Information "%opt{crust},%opt{teal}" +set-face global Error "%opt{crust},%opt{red}" +set-face global StatusLine "%opt{text},%opt{mantle}" +set-face global StatusLineMode "%opt{crust},%opt{yellow}" +set-face global StatusLineInfo "%opt{crust},%opt{teal}" +set-face global StatusLineValue "%opt{crust},%opt{yellow}" +set-face global StatusCursor "%opt{crust},%opt{rosewater}" +set-face global Prompt "%opt{teal},%opt{base}+b" +set-face global MatchingChar "%opt{maroon},%opt{base}" +set-face global Whitespace "%opt{overlay1},%opt{base}+f" +set-face global WrapMarker "Whitespace" +set-face global BufferPadding "%opt{base},%opt{base}" + +set-face global value "%opt{peach}" +set-face global type "%opt{blue}" +set-face global variable "%opt{text}" +set-face global module "%opt{maroon}" +set-face global function "%opt{blue}" +set-face global string "%opt{green}" +set-face global keyword "%opt{mauve}" +set-face global operator "%opt{sky}" +set-face global attribute "%opt{green}" +set-face global comment "%opt{overlay0}" +set-face global documentation "comment" +set-face global meta "%opt{yellow}" +set-face global builtin "%opt{red}"