| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- # use Ctrl-A as the tmux command prefix instead of Ctrl-B
- unbind C-b
- set-option -g prefix C-a
- # start windows from 1
- set-option -g base-index 1
- # history scrollback
- set-option -g history-limit 9999999
- # Display a status line message when activity occurs in a window for which the
- # monitor-activity window option is enabled.
- set-option -g visual-activity on
- # Resize the window to the size of the smallest session for which it is the
- # current window, rather than the smallest session to which it is attached.
- set-window-option -g aggressive-resize on
- # Mouse Support! (for scrollback, and lazy manipulation of windows/panes)
- # At least with iTerm2, this plays very well with vim mouse support :D Yay!
- # Note: text-selection by default does a tmux copy (paste with prefix+]).
- # Hold alt/meta/option for system selection/copy.
- set-option -g mode-mouse on
- set-option -g mouse-select-pane
- set-option -g mouse-resize-pane on
- set-option -g mouse-select-window on
- # act like vim
- set-option -g status-keys vi
- set-window-option -g mode-keys vi # vi keys in copy mode (prefix+[)
- #######################
- # General Key Bindings
- #######################
- # act like vim. enhance copy mode to use more vim like keys for copying
- bind-key -t vi-copy 'v' begin-selection
- bind-key -t vi-copy 'y' copy-selection
- # prefix+R to reload the config file
- bind-key C-r source-file ~/.tmux.conf; display-message "tmux.conf reloaded"
- # detach client like screen, C-a C-d
- bind-key C-d detach-client
- ###################################
- # Window/Pane/Session Manipulation
- ###################################
- # Window Movement
- bind-key -r C-h previous-window
- bind-key -r C-l next-window
- bind-key -n M-1 select-window -t 1
- bind-key -n M-2 select-window -t 2
- bind-key -n M-3 select-window -t 3
- bind-key -n M-4 select-window -t 4
- bind-key -n M-5 select-window -t 5
- bind-key -n M-6 select-window -t 6
- bind-key -n M-7 select-window -t 7
- bind-key -n M-8 select-window -t 8
- bind-key -n M-9 select-window -t 9
- bind-key -n M-0 select-window -t 10
- # Window Creation/Destruction
- bind-key C-c new-window
- # Remember `prefix+,` for renaming windows
- # Pane Movement
- bind-key h select-pane -L
- bind-key j select-pane -D
- bind-key k select-pane -U
- bind-key l select-pane -R
- # Pane Creation/Destruction
- unbind % # Remove default binding for horizontal split since we’re replacing
- bind-key -n C-\ split-window -h
- bind-key -n C-_ split-window -v
- bind-key C-x kill-pane
- # Pane Sychronisation
- bind-key s set -w synchronize-panes
- # Session Switching/Destruction
- bind-key C-s choose-session
- bind-key X kill-session
- # Remember `prefix+$` for renaming sessions
- ########################
- # Visual
- ########################
- # Use solarized colour palette
- source ~/dotfiles/tmux/tmux-colors-solarized/tmuxcolors-256.conf
- # tmux-powerline setup
- set-option -g status on
- set-option -g status-interval 2
- set-option -g status-utf8 on
- set-option -g status-justify "centre"
- set-option -g status-left-length 60
- set-option -g status-right-length 90
- set-option -g status-left "#(~/dotfiles/tmux/tmux-powerline-custom/status-left.sh)"
- set-option -g status-right "#(~/dotfiles/tmux/tmux-powerline-custom/status-right.sh)"
- # Highlight current window
- set -g window-status-current-bg red
- set -g window-status-current-fg white
|