#!/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 [[ -n $TMUXIFIER ]] && _ensure_repo jimeh/tmuxifier $TMUXIFIER _ensure_repo tmux-plugins/tpm $TMUX_PLUGINS_HOME/tpm } 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 scripts $TMUX_HOME/scripts mklink layouts $TMUXIFIER_LAYOUT_PATH } clean() { rm -rfv $TMUX_HOME $TMUX_PLUGINS_HOME $TMUXIFIER } init "$@"