Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tmux/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if ! command -v tmux &> /dev/null ; then
elif command -v pacman &> /dev/null ; then
sudo pacman -S --noconfirm tmux
fi
fi
#
# tmux plugin installation
# Installs TPM (Tmux Plugin Manager) which handles tmux-resurrect and tmux-continuum
Expand All @@ -28,8 +29,17 @@ else
echo " TPM already installed"
fi

# Symlink tmux.conf so tmux (and TPM) can find it
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ ! -e "$HOME/.tmux.conf" ]; then
echo " Symlinking tmux.conf..."
ln -s "$SCRIPT_DIR/tmux.conf.symlink" "$HOME/.tmux.conf"
fi

# Install plugins non-interactively if tmux is available
if command -v tmux &> /dev/null; then
echo " Installing tmux plugins..."
# TPM queries tmux's global environment for this variable; set it before installing
tmux start-server\; set-environment -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.tmux/plugins"
"$TPM_DIR/bin/install_plugins" || true
fi
Loading