1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-22 22:55:26 +03:00

Add a colorscheme command and a first zenburn them in the colors directory

This commit is contained in:
Maxime Coste 2015-07-02 13:56:38 +01:00
parent 12dd7b04ac
commit 466410529a
3 changed files with 65 additions and 0 deletions

47
colors/zenburn.kak Normal file
View File

@ -0,0 +1,47 @@
# zenburn theme
# first we define the zenburn colors as faces
face zenbackground rgb:3f3f3f
face zentext rgb:efefef
face zenkeyword rgb:f0dfaf+b
face zenstorageClass rgb:c3bf9f+b
face zennumber rgb:8cd0d3
face zencomment rgb:7f9f7f
face zenconstant rgb:dca3a3+b
face zenspecial rgb:cfbfaf
face zenfunction rgb:efef8f
face zenstatement rgb:e3ceab
face zenidentifier rgb:efdcbc
face zentype rgb:dfdfbf
face zenstring rgb:cc9393
face zenexception rgb:c3bf9f+b
face zenmatching rgb:3f3f3f,rgb:8cd0d3
# then we map them to code
face value zenconstant
face type zentype
face identifier zenidentifier
face string zenstring
face error zenexception
face keyword zenkeyword
face operator zenfunction
face attribute zenstatement
face comment zencomment
face meta zenspecial
# and markup
face title zenkeyword
face header zenconstant
face bold zenstorageClass
face italic zenfunction
face mono zennumber
face block zenstatement
face link zenstring
face bullet zenidentifier
face list zentype
face Default default,rgb:3f3f3f
face StatusLine rgb:efdcbc,rgb:2a2a2a
face Information rgb:cc9393,rgb:2a2a2a
face MenuBackground rgb:7f9f7f,rgb:4a4a4a
face MenuForeground rgb:8cd0d3,rgb:4a4a4a

1
share/kak/colors Symbolic link
View File

@ -0,0 +1 @@
../../colors

View File

@ -30,6 +30,23 @@ def -shell-params runtime %{ %sh{
done
}}
def -shell-params -docstring "colorscheme <name>: enable named colorscheme" \
-shell-completion %{
prefix=${1:0:${kak_pos_in_token}}
(
for col in ${kak_runtime}/colors/*.kak; do
expr $(basename "${col}" .kak) : "^\(${prefix}.*\)$"
done
) | grep -v '^$'
} \
colorscheme %{ %sh{
if [ $# -eq 1 ]; then
echo "source '${kak_runtime}/colors/$1.kak'"
else
echo -color Error 'Usage: colorscheme <scheme name>'
fi
}}
%sh{
autoload() {
dir=$1