fix XDG_CONFIG_HOME naming

This commit is contained in:
Marty Oehme 2019-03-12 15:47:07 +01:00
parent 283f86a6ba
commit 4eb00e6915
4 changed files with 6 additions and 9 deletions

View file

@ -50,13 +50,11 @@ set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
#run-shell ~/.tmux-plugins/resurrect/resurrect.tmux
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Recently removed due to causing too many incompatibilities with how I want it set up
#set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'Morantron/tmux-fingers'
run -b "${TMUX_PLUGIN_MANAGER_PATH}/tpm/tpm"
run "${TMUX_PLUGIN_MANAGER_PATH}/tpm/tpm"
#####################
## 3. KEYBINDINGS ##

View file

@ -1,6 +1,6 @@
# Clone tmux plugin manager if not existing
if [[ -z "$TPM_PARENT_DIR" ]]; then
TPM_PARENT_DIR=${XDG_CONFIG_DIR:-$HOME/.config}/tmux
TPM_PARENT_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/tmux
fi
if [[ ! -f $TPM_PARENT_DIR/plugins/tpm/tpm ]]; then

View file

@ -1,5 +1,4 @@
export XDG_CONFIG_DIR="$HOME/.config"
export XDG_CONFIG_HOME=$XDG_CONFIG_DIR
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export EDITOR=nvim

6
.zshrc
View file

@ -29,7 +29,7 @@ print_dbg() {
# Clone zgen if you haven't already
check_zgen_installation() {
if [[ -z "$ZGEN_PARENT_DIR" ]]; then
ZGEN_PARENT_DIR=${${XDG_CONFIG_DIR}:="$HOME/.config/"}
ZGEN_PARENT_DIR=${${XDG_CONFIG_HOME}:="$HOME/.config/"}
ZGEN_DIR="$ZGEN_PARENT_DIR/zgen"
fi
if [[ ! -f $ZGEN_DIR/zgen.zsh ]]; then
@ -90,9 +90,9 @@ load_config_files() {
# Set ZSH_CONFIG_DIR to default to ~/.config/zsh, or let user override
# Exit early if no configuration directory has been found
if [ ! -d ${ZSH_CONFIG_DIR:="${XDG_CONFIG_DIR:-$HOME/.config}/zsh"} ]; then
if [ ! -d ${ZSH_CONFIG_DIR:="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"} ]; then
# If the user explicitly overrode the path give him an error
if [ ! $ZSH_CONFIG_DIR = "${XDG_CONFIG_DIR:-$HOME/.config/}/zsh" ]; then
if [ ! $ZSH_CONFIG_DIR = "${XDG_CONFIG_HOME:-$HOME/.config/}/zsh" ]; then
printf "\$ZSH_CONFIG_DIR=$ZSH_CONFIG_DIR/ does not exist.\n"
fi
PS1="$HOME $ "