diff --git a/README.asciidoc b/README.asciidoc index 2915621b6..e7dab4504 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -488,6 +488,7 @@ Basic Commands * `source `: execute commands in * `runtime `: execute commands in , is relative to kak executable path. + * `colorscheme `: load named colorscheme. * `nameclient `: set current client name * `namebuf `: set current buffer name * `echo `: show in status line diff --git a/colors/zenburn.kak b/colors/zenburn.kak new file mode 100644 index 000000000..c092cbe15 --- /dev/null +++ b/colors/zenburn.kak @@ -0,0 +1,52 @@ +# zenburn theme + +# first we define the zenburn colors as faces +face zenbackground default,rgb:3f3f3f +face zenstatus rgb:efdcbc,rgb:2a2a2a +face zeninfo rgb:cc9393,rgb:2a2a2a +face zenmenubg rgb:7f9f7f,rgb:4a4a4a +face zenmenufg rgb:8cd0d3,rgb:4a4a4a +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 + +# and built in faces +face Default zenbackground +face StatusLine zenstatus +face Information zeninfo +face MenuBackground zenmenubg +face MenuForeground zenmenufg diff --git a/rc/kakrc.kak b/rc/kakrc.kak index fe6a6df8d..0d423cece 100644 --- a/rc/kakrc.kak +++ b/rc/kakrc.kak @@ -8,7 +8,7 @@ addhl -group / regions -default code kakrc \ single_string %{(^|\h)'} %{(? 0:keyword +addhl -group /kakrc/code regex \<(hook|rmhooks|addhl|rmhl|exec|eval|source|runtime|def|alias|unalias|decl|echo|edit|set|map|face|prompt|menu|info|try|catch|nameclient|namebuf|cd|colorscheme)\> 0:keyword addhl -group /kakrc/code regex \<(default|black|red|green|yellow|blue|magenta|cyan|white|(?:rgb:[0-9a-fA-F]{6}))\> 0:value addhl -group /kakrc/code regex (?:\: 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 ' + fi +}} + %sh{ autoload() { dir=$1