summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-12-23 21:26:07 +0000
committerMaxime Coste <frrrwww@gmail.com>2013-12-23 21:36:05 +0000
commitfa72d27f9a78d6af8052523d9166a31000d4cba8 (patch)
treef96584cf5b7d0cfb286ae5851612a2ecf9091ff1 /share
parentbcba5287ade17a23c47daad15a703c72f8c3ab88 (diff)
Make kak more installable
* Kak relies on the kakrc file to be in ../share/kak/kakrc relative to kak binary rather than in the same directory * Added an install target to the Makefile
Diffstat (limited to 'share')
-rw-r--r--share/kak/kakrc34
1 files changed, 34 insertions, 0 deletions
diff --git a/share/kak/kakrc b/share/kak/kakrc
new file mode 100644
index 00000000..81ec831b
--- /dev/null
+++ b/share/kak/kakrc
@@ -0,0 +1,34 @@
+# define color scheme
+colalias value red
+colalias type yellow
+colalias identifier cyan
+colalias string magenta
+colalias error default,red
+colalias keyword blue
+colalias operator yellow
+colalias attribute green
+colalias comment cyan
+colalias macro magenta
+
+def -shell-params runtime %{ %sh{
+ while [ $# -gt 0 ]; do
+ echo "source '${kak_runtime}/$1'"
+ shift
+ done
+}}
+
+%sh{
+ if [ -n "${XDG_CONFIG_HOME}" ]; then
+ localconfdir="${XDG_CONFIG_HOME}/kak"
+ else
+ localconfdir="$HOME/.config/kak"
+ fi
+ if [ -d "${localconfdir}/autoload" ]; then
+ for rcfile in ${localconfdir}/autoload/*; do
+ echo "try %{ source '${rcfile}' } catch %{ }";
+ done
+ fi
+ if [ -f "${localconfdir}/kakrc" ]; then
+ echo "source '${localconfdir}/kakrc'"
+ fi
+}