diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..58dc910 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,51 @@ +# Set a new prefix / leader key. +set -g prefix ` +bind ` send-prefix + +# Add a bit more scroll history in the buffer. +set -g history-limit 50000 + +# Enable color support inside of tmux. +set -g default-terminal "xterm-256color" +set -ga terminal-overrides ",*256col*:Tc" + +# Ensure window titles get renamed automatically. +setw -g automatic-rename + +# Ensure window index numbers get reordered on delete. +set-option -g renumber-windows on + +# Start windows and panes index at 1, not 0. +set -g base-index 1 +setw -g pane-base-index 1 + +# Enable full mouse support. +set -g mouse on + +# Unbind default keys +unbind C-b +unbind '"' +unbind % + +# Reload the tmux config. +bind-key r source-file ~/.tmux.conf + +# Split panes. +bind-key Down split-window -v +bind-key Right split-window -h + +# Move around panes with ALT + arrow keys. +bind-key -n M-Up select-pane -U +bind-key -n M-Left select-pane -L +bind-key -n M-Down select-pane -D +bind-key -n M-Right select-pane -R + +# Resize panes with CTRL + ALT + arrow keys. +bind-key -n C-M-Right resize-pane -R +bind-key -n C-M-Left resize-pane -L +bind-key -n C-M-Up resize-pane -U +bind-key -n C-M-Down resize-pane -D + +set -g @plugin 'tmux-plugins/tpm' + +run '~/.tmux/plugins/tpm/tpm' diff --git a/install b/install index d804457..fb7f8d5 100755 --- a/install +++ b/install @@ -42,6 +42,7 @@ if [ ! -d "${ZSH_CUSTOM}/plugins/zsh-syntax-highlighting" ]; then echo "Installing zsh-syntax-highlighting" git clone --depth 1 -- https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting fi +[[ -d "${HOME}/.tmux/plugins/tpm" ]] || git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm [[ -d ${LOCAL_BIN_DIR} ]] || mkdir -p ${LOCAL_BIN_DIR} @@ -54,6 +55,7 @@ ln -sf ${INSTALL_DIR}/.functions ${HOME}/.functions ln -sf ${INSTALL_DIR}/.gitconfig ${HOME}/.gitconfig ln -sf ${INSTALL_DIR}/.npmrc ${HOME}/.npmrc ln -sf ${INSTALL_DIR}/.pythonrc ${HOME}/.pythonrc +ln -sf ${INSTALL_DIR}/.tmux.conf ${HOME}/.tmux.conf ln -sf ${INSTALL_DIR}/.zprofile ${HOME}/.zprofile ln -sf ${INSTALL_DIR}/.zshenv ${HOME}/.zshenv ln -sf ${INSTALL_DIR}/.zshrc ${HOME}/.zshrc