37 lines
680 B
Plaintext
37 lines
680 B
Plaintext
|
#!/usr/bin/env zsh
|
||
|
source ${0:A:h}/../../deploy
|
||
|
source env.zsh
|
||
|
|
||
|
install() {
|
||
|
case $(_os) in
|
||
|
macos) brew install tmux ;;
|
||
|
arch) sudo pacman --needed --noconfirm -S tmux ;;
|
||
|
debian) sudo apt-get install -y tmux ;;
|
||
|
esac
|
||
|
|
||
|
[[ $TMUXIFIER ]] && _ensure_repo jimeh/tmuxifier $TMUXIFIER
|
||
|
}
|
||
|
|
||
|
update() {
|
||
|
local tpm=$TMUX_PLUGINS_PATH/tpm
|
||
|
if [[ -d $tpm ]]; then
|
||
|
$tpm/bin/update_plugins all
|
||
|
$tpm/bin/clean_plugins all
|
||
|
fi
|
||
|
|
||
|
if [[ -d $TMUXIFIER ]]; then
|
||
|
cd $TMUXIFIER && git pull --rebase
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
link() {
|
||
|
mklink tmux*.conf $TMUX_HOME/
|
||
|
mklink layouts $TMUXIFIER_LAYOUT_PATH
|
||
|
}
|
||
|
|
||
|
clean() {
|
||
|
rm -rfv $TMUX_HOME $TMUX_PLUGINS_HOME $TMUXIFIER
|
||
|
}
|
||
|
|
||
|
init "$@"
|