diff options
Diffstat (limited to 'files/.config/tmux/tmux.conf')
| -rw-r--r-- | files/.config/tmux/tmux.conf | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/files/.config/tmux/tmux.conf b/files/.config/tmux/tmux.conf new file mode 100644 index 0000000..5ba8335 --- /dev/null +++ b/files/.config/tmux/tmux.conf @@ -0,0 +1,80 @@ +# Inspired by https://github.com/willnorris/dotfiles/blob/main/tmux.conf + +# bind prefix to ^a +unbind C-b +set -g prefix ` +bind-key ` send-prefix + +## make window/pane index start with 1 +set -g base-index 1 +setw -g pane-base-index 1 +set -g renumber-windows on + +set -g set-titles on +set -g set-titles-string "#W @ #H[#S]" + +# disable auto rename of windows +set -g allow-rename off + +# enable mouse support +setw -g mouse on + +# watch background windows for activity and highlight status bar +set -g monitor-activity on + +## set vi mode for copy mode +#setw -g mode-keys vi +#unbind [ +#bind Escape copy-mode +#unbind p +#bind p paste-buffer +#bind -t vi-copy 'v' begin-selection +#bind -t vi-copy 't' copy-selection + +## +## Key bindings +## + +bind Space copy-mode + +# don't pre-fill with window or session original name when renaming +bind '$' command-prompt -p "(rename-session '#S')" "rename-session '%%'" +bind , command-prompt -p "(rename-window '#W')" "rename-window '%%'" + +# Move windows +if-shell -b '[ "$(echo "$TMUX_VERSION < 3.0" | bc)" = 1 ]' " \ + bind P swap-window -t -1; \ + bind N swap-window -t +1" +if-shell -b '[ "$(echo "$TMUX_VERSION >= 3.0" | bc)" = 1 ]' " \ + bind P { swap-window -t -1; select-window -t -1}; \ + bind N { swap-window -t +1; select-window -t +1}" + +#bind \ split-window -h -c '#{pane_current_path}' + +# toggle last 2 windows +bind Tab last-window +bind BTab swap-pane -t - + +# Status bar +set -g status-right "$USER@#h %H:%M" + +set -g @colors-solarized 'light' + +# To Install Plugin: <Prefix> + I +# To Uninstall Plugin: <Prefix> + <Alt> + U + +if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local' + +# Plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'seebi/tmux-colors-solarized' +set -g @plugin 'christoomey/vim-tmux-navigator' +set -g @plugin 'tmux-plugins/tmux-pain-control' +set -g @plugin 'tmux-plugins/tmux-yank' +set -g @plugin 'tmux-plugins/tmux-copycat' +set -g @plugin 'tmux-plugins/tmux-open' +set -g @plugin 'tmux-plugins/tmux-resurrect' + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run '~/.config/tmux/plugins/tpm/tpm' |
