mirror of
https://github.com/samoshkin/tmux-config.git
synced 2026-01-06 17:58:02 +00:00
Finish with appearence and status bar. Integrate various plugins including tmux-plugin-sysstat
This commit is contained in:
40
install.sh
40
install.sh
@@ -10,28 +10,40 @@ is_app_installed() {
|
||||
REPODIR="$(cd "$(dirname "$0")"; pwd -P)"
|
||||
cd "$REPODIR";
|
||||
|
||||
git submodule update --recursive --init --quiet;
|
||||
|
||||
if ! is_app_installed tmux; then
|
||||
printf "$(tput setaf 1)WARNING:$(tput sgr0) \"tmux\" command is not found. \
|
||||
Install \"tmux\" yourself\n"
|
||||
Install it first\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# .tmux may already exist (created by tmux plugin manager)
|
||||
rsync -aq --backup ./tmux/ "$HOME"/.tmux
|
||||
if [ ! -e "$HOME/.tmux/plugins/tpm" ]; then
|
||||
printf "$(tput setaf 1)WARNING:$(tput sgr0) Cannot found TPM (Tmux Plugin Manager) \
|
||||
at default location: \$HOME/.tmux/plugins/tpm. Install it first\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -e "$HOME/.tmux.conf" ]; then
|
||||
printf "Found existing .tmux.conf in your \$HOME directory. Will backup it and overwrite with new .tmux.conf file? OK (y/n): "
|
||||
read -r answer
|
||||
if echo "$answer" | grep -iq "^n"; then
|
||||
printf "Install config manually using command below:\n\n";
|
||||
printf "\t cd && ln -sf .tmux/tmux.conf .tmux.conf\n";
|
||||
exit 1;
|
||||
fi
|
||||
printf "Found existing .tmux.conf in your \$HOME directory. Will create a backup at $HOME/.tmux.conf.bak\n"
|
||||
fi
|
||||
|
||||
ln -sf --backup=numbered .tmux/tmux.conf "$HOME"/.tmux.conf;
|
||||
printf "$(tput setaf 2)OK:$(tput sgr0) Files are copied to \$HOME/.tmux and symlink at \$HOME/.tmux.conf is created\n"
|
||||
git submodule init;
|
||||
|
||||
rsync -aq ./tmux/ "$HOME"/.tmux
|
||||
|
||||
ln -sf --backup --suffix=.bak .tmux/tmux.conf "$HOME"/.tmux.conf;
|
||||
|
||||
"$HOME"/.tmux/plugins/tpm/bin/install_plugins
|
||||
|
||||
printf "$(tput setaf 2)OK:$(tput sgr0) Completed\n"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user