Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #.tmux.conf
- #set-option -g default-shell "/usr/bin/bash"
- set -g default-terminal "screen-256color"
- #open the tmux config in tmux pane using <prefix> followed by shift + E, edit your configuration, and save when you done. To reload the tmux configuration use <prefix> followed by r.
- #** <prefix> is C-z for hashrocket’s dotfile project (dotmatrix), if you are using tmux default configuration it would be C-b
- bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
- bind-key E split-window -h "nano ~/.tmux.conf"
- # remap prefix from 'C-b' to 'C-z'
- unbind C-b
- set-option -g prefix C-z
- bind-key C-z send-prefix
- # split panes using | and -
- bind | split-window -h
- bind - split-window -v
- unbind '"'
- unbind %
- # switch panes using Alt-arrow without prefix
- bind -n M-w select-pane -L
- bind -n M-d select-pane -R
- bind -n M-w select-pane -U
- bind -n M-s select-pane -D
- ### Mouse On/Off ### {{{
- ## Mouse On by default
- set -g mouse on
- ##Toggle mouse on with <prefix>m
- bind m \
- set -g mouse off\;\
- display 'Mouse: #{?mouse,on,off}'
- ### End Mouse On/Off ### }}}
- # Scroll History
- set -g history-limit 50000
- # show messages for 4 seconds instead
- set -g display-time 4000
- # set first window to index 1 (not 0) to map more to the keyboard layout
- set-option -g renumber-windows on
- set -g base-index 1
- setw -g pane-base-index 1
- # Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
- set -s escape-time 50
- ## Clipboard integration
- # ctrl+c to send to clipboard
- bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
- # ctrl+v to paste from clipboard
- bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
- # Selection with mouse should copy to clipboard right away, in addition to the default action.
- unbind -n -Tcopy-mode-vi MouseDragEnd1Pane
- bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"
- # Middle click to paste from the clipboard
- unbind-key MouseDown2Pane
- bind-key -n MouseDown2Pane run " \
- X=$(xclip -o -sel clipboard); \
- tmux set-buffer \"$X\"; \
- tmux paste-buffer -p; \
- tmux display-message 'pasted!' \
- "
- # Drag to re-order windows
- bind-key -n MouseDrag1Status swap-window -t=
- # Double click on the window list to open a new window
- bind-key -n DoubleClick1Status new-window
- # Shift arrow to switch windows
- bind -n S-Left previous-window
- bind -n S-Right next-window
- # THEME
- set -g status-bg black
- set -g status-fg white
- set -g status-interval 60
- set -g status-left-length 30
- set -g status-left '#[fg=green](#S) #(whoami)'
- set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement