From 2b523a19f2a62e27067435a4ada4572046459a77 Mon Sep 17 00:00:00 2001 From: psox Date: Thu, 4 Nov 2021 15:59:05 +0000 Subject: [PATCH] fix copy bug in zshrc --- zshrc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zshrc b/zshrc index fcc3dc7..b3e7fca 100755 --- a/zshrc +++ b/zshrc @@ -157,14 +157,18 @@ then [ -z "$TMUX_PATH" ] && TMUX_PATH=~/.config/tmux # Bootstrap the user's plugin directory, if required - [ -d "$TMUX_PATH/plugins" ] || { mkdir -vp "$TMUX_PATH/plugins" && cp -r "$PSOXIZSH/tmux/plugins" "$TMUX_PATH/plugins" } + [ -d "$TMUX_PATH/plugins" ] || { + cp -r "$PSOXIZSH/tmux/plugins" "$TMUX_PATH" + } # Both tmux and TPM are very opininated about where configs must live, # and TPM will only expand one layer of source-file directives, so we # symlink the base config to the user local config file, if it doesn't # exist. - [ ! -f ~/.tmux.conf ] && ln -s $PSOXIZSH/tmux/tmux.conf ~/.tmux.conf - [ ! -f "$TMUX_PATH/plugins.conf" ] && ln -s "$PSOXIZSH/tmux/fragment/plugins.conf" "$TMUX_PATH/plugins.conf" + [[ ! -f $TMUX_PATH/tmux.conf ]] && cp -r "$PSOXIZSH/tmux/tmux.conf" "$TMUX_PATH/tmux.conf" + [[ ! -f ~/.tmux.conf ]] && ln -s $PSOXIZSH/tmux/tmux.conf ~/.tmux.conf + [[ ! -f "$TMUX_PATH/plugins.conf" ]] && ln -vs "$PSOXIZSH/tmux/fragment/plugins.conf" "$TMUX_PATH/plugins.conf" + [[ "$USER" == "astemmet" ]] && [[ ! -f $TMUX_PATH/early.conf ]] && ln -vs "$PSOXIZSH/tmux/fragment/ctrl-alt-movement.conf" "$TMUX_PATH/early.conf" export TMUX_PATH=$TMUX_PATH TMUX_PLUGINS="$TMUX_PATH/plugins" TMUX_CONFIG=~/.tmux.conf fi