From 0e57e08deebf4466736db5e68275107628772875 Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Tue, 27 Dec 2016 19:05:43 +0100 Subject: [PATCH] Move zsh config to its own directory. --- zsh/.config/zsh/.gitignore | 1 + zsh/.config/zsh/.zkbd/xterm-256color.tmp | 2 ++ zsh/{ => .config/zsh}/.zshrc | 13 +++---------- .../zsh/zkbd/linux} | 0 .../zsh/zkbd/screen-256color} | 0 .../zsh/zkbd/xterm-256color} | 0 zsh/.zkbd/screen-256color-unknown-linux-gnueabihf | 1 - zsh/.zkbd/xterm-256color-:0 | 1 - zsh/.zshenv | 3 +++ 9 files changed, 9 insertions(+), 12 deletions(-) create mode 100644 zsh/.config/zsh/.gitignore create mode 100644 zsh/.config/zsh/.zkbd/xterm-256color.tmp rename zsh/{ => .config/zsh}/.zshrc (91%) rename zsh/{.zkbd/linux-unknown-linux-gnu => .config/zsh/zkbd/linux} (100%) rename zsh/{.zkbd/screen-256color-unknown-linux-gnu => .config/zsh/zkbd/screen-256color} (100%) rename zsh/{.zkbd/xterm-256color-:1 => .config/zsh/zkbd/xterm-256color} (100%) delete mode 120000 zsh/.zkbd/screen-256color-unknown-linux-gnueabihf delete mode 120000 zsh/.zkbd/xterm-256color-:0 diff --git a/zsh/.config/zsh/.gitignore b/zsh/.config/zsh/.gitignore new file mode 100644 index 0000000..dea2d4f --- /dev/null +++ b/zsh/.config/zsh/.gitignore @@ -0,0 +1 @@ +.zcompdump diff --git a/zsh/.config/zsh/.zkbd/xterm-256color.tmp b/zsh/.config/zsh/.zkbd/xterm-256color.tmp new file mode 100644 index 0000000..3a30031 --- /dev/null +++ b/zsh/.config/zsh/.zkbd/xterm-256color.tmp @@ -0,0 +1,2 @@ +typeset -g -A key + diff --git a/zsh/.zshrc b/zsh/.config/zsh/.zshrc similarity index 91% rename from zsh/.zshrc rename to zsh/.config/zsh/.zshrc index c63638e..756bd96 100644 --- a/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -13,20 +13,13 @@ fi ####################### autoload zkbd -function zkbd_file() { - [[ -f ~/.zkbd/${TERM}-${VENDOR}-${OSTYPE} ]] && printf '%s' ~/".zkbd/${TERM}-${VENDOR}-${OSTYPE}" && return 0 - [[ -f ~/.zkbd/${TERM}-${DISPLAY} ]] && printf '%s' ~/".zkbd/${TERM}-${DISPLAY}" && return 0 - return 1 -} - -[[ ! -d ~/.zkbd ]] && mkdir ~/.zkbd -keyfile=$(zkbd_file) -if [[ $? -eq 0 ]]; then +keyfile="$XDG_CONFIG_HOME/zsh/zkbd/${TERM}" +if [[ -f ${keyfile} ]]; then source "${keyfile}" elif [[ -o interactive ]]; then echo "Unable to load key data for special keys. Run zkbd to fix." fi -unfunction zkbd_file; unset keyfile +unset keyfile bindkey -e # zshrc aliases diff --git a/zsh/.zkbd/linux-unknown-linux-gnu b/zsh/.config/zsh/zkbd/linux similarity index 100% rename from zsh/.zkbd/linux-unknown-linux-gnu rename to zsh/.config/zsh/zkbd/linux diff --git a/zsh/.zkbd/screen-256color-unknown-linux-gnu b/zsh/.config/zsh/zkbd/screen-256color similarity index 100% rename from zsh/.zkbd/screen-256color-unknown-linux-gnu rename to zsh/.config/zsh/zkbd/screen-256color diff --git a/zsh/.zkbd/xterm-256color-:1 b/zsh/.config/zsh/zkbd/xterm-256color similarity index 100% rename from zsh/.zkbd/xterm-256color-:1 rename to zsh/.config/zsh/zkbd/xterm-256color diff --git a/zsh/.zkbd/screen-256color-unknown-linux-gnueabihf b/zsh/.zkbd/screen-256color-unknown-linux-gnueabihf deleted file mode 120000 index f1d75e0..0000000 --- a/zsh/.zkbd/screen-256color-unknown-linux-gnueabihf +++ /dev/null @@ -1 +0,0 @@ -screen-256color-unknown-linux-gnu \ No newline at end of file diff --git a/zsh/.zkbd/xterm-256color-:0 b/zsh/.zkbd/xterm-256color-:0 deleted file mode 120000 index 363c01b..0000000 --- a/zsh/.zkbd/xterm-256color-:0 +++ /dev/null @@ -1 +0,0 @@ -xterm-256color-:1 \ No newline at end of file diff --git a/zsh/.zshenv b/zsh/.zshenv index 2c5ba5a..758506d 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -9,6 +9,9 @@ if [ -z $XDG_DATA_HOME ]; then export XDG_DATA_HOME="$HOME/.local/share" fi +# Move the remaining zsh installation +export ZDOTDIR="$XDG_CONFIG_HOME/zsh" + # Some systems do not set XDG_RUNTIME_DIR, create an alternative. if [ -z $XDG_RUNTIME_DIR ]; then if [ -n "$TMPDIR" ]; then