Browse Source

Feature updates. Focued on tmux

Added a .tmux.conf to the dotfiles

Added the tmux-plugin manager

Added tmux-ressurect to allow restoring tmux sessions

Added a helper method to the bootstrapper to clone or update repositories.
master
Drew Short 9 years ago
parent
commit
9ff0bdfd50
  1. 13
      home/.tmux.conf
  2. 24
      scripts/bootstrap.sh

13
home/.tmux.conf

@ -0,0 +1,13 @@
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Other examples
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (This must always be at the bottom)
run '~/.tmux/plugins/tpm/tpm'

24
scripts/bootstrap.sh

@ -63,6 +63,23 @@ escape_path() {
echo $safe echo $safe
} }
# Clone a git repository into a location
clone_git_repo() {
local target=$1
local repo=$2
if [ ! -d "$target" ]; then
mkdir -p "$target"
git clone "$repo" "$target"
else
# Update the repo otherwise
cur_dir=$PWD
cd "$target"
git checkout .
git pull
cd $cur_dir
fi
}
set -x set -x
set -e set -e
@ -130,6 +147,13 @@ link "$HOME" ".gitconfig" "$DOTFILES_HOME/.gitconfig"
# Configure .zshrc # Configure .zshrc
link "$HOME" ".zshrc" "$DOTFILES_HOME/.zshrc" link "$HOME" ".zshrc" "$DOTFILES_HOME/.zshrc"
clone_git_repo $HOME/.tmux/plugins/tpm https://github.com/tmux-plugins/tpm.git
clone_git_repo $HOME/.tmux/plugins/tmux-sensible https://github.com/tmux-plugins/tmux-sensible.git
clone_git_repo $HOME/.tmux/plugins/tmux-resurrect https://github.com/tmux-plugins/tmux-resurrect.git
# Configure .tmux.conf
link "$HOME" ".tmux.conf" "$DOTFILES_HOME/.tmux.conf"
cd $GIT_DIR cd $GIT_DIR
# Create an auto updater for the dotfiles # Create an auto updater for the dotfiles

Loading…
Cancel
Save