-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.sh
executable file
·42 lines (33 loc) · 976 Bytes
/
tmux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
mkdir -p ~/dotfiles/backups
if [ -x "$(command -v apt-get)" ]; then
sudo apt-get update
else
if [ -x "$(command -v brew)" ]; then
brew update
fi
fi
if [ ! -x "$(command -v tmux)" ]; then
if [ -x "$(command -v apt-get)" ]; then
sudo apt-get install tmux
else
if [ -x "$(command -v brew)" ]; then
brew install tmux
fi
fi
fi
if [ ! -f ~/.tmux/plugins/tpm ]; then
echo "[+] Installing tpm"
mkdir -p $HOME/.tmux/plugins
git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm
fi
if [ -f ~/.tmux.conf ]; then
mv ~/.tmux.conf ~/dotfiles/backups
fi
ln -sf ~/dotfiles/.tmux.conf ~/.tmux.conf
tmux source ~/.tmux.conf
$HOME/.tmux/plugins/tpm/scripts/install_plugins.sh
tmux source ~/.tmux.conf
echo "[+] Linked .tmux.conf"
echo "[+] Setup complete. Any existing files have been moved to ~/dotfiles/backups"
echo "[+] Install a nerd font from https://github.com/ryanoasis/nerd-fonts for the tmux-power plugin to display properly."