diff --git a/colors/zenburn.kak b/colors/zenburn.kak new file mode 100644 index 00000000..ca94106e --- /dev/null +++ b/colors/zenburn.kak @@ -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 diff --git a/share/kak/colors b/share/kak/colors new file mode 120000 index 00000000..daf99fdc --- /dev/null +++ b/share/kak/colors @@ -0,0 +1 @@ +../../colors \ No newline at end of file diff --git a/share/kak/kakrc b/share/kak/kakrc index 38a15b8f..e588fd48 100644 --- a/share/kak/kakrc +++ b/share/kak/kakrc @@ -30,6 +30,23 @@ def -shell-params runtime %{ %sh{ done }} +def -shell-params -docstring "colorscheme : 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