Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###########################
- # Initialization
- ###########################
- # Unbind all keys
- #unbind-key -a
- ###########################
- # General
- ###########################
- # Set prefix to M-e
- set -g prefix M-e
- unbind M-e ; bind M-e send-prefix
- # Set general options
- set -g mode-keys vi # vi keybindings for movement
- set -g status-keys vi # vi keybindings for movement
- set -g base-index 1 # base window index (default 0)
- set -g pane-base-index 1 # base pane index (default 0)
- set -g history-limit 100000 # increase history size
- set -g default-terminal "screen-256color" # 256 color terminal
- set -g renumber-windows on # Renumber windows
- # Set ability to capture on start and restore on exit window data when running an application
- setw -g alternate-screen on
- # Server options
- set -sg escape-time 10
- # Window title
- set -g set-titles on
- set -g set-titles-string '[#S] #I:#W'
- # Set window options
- setw -g aggressive-resize on # Resize window to active viewer
- ###########################
- # Status Bar
- ###########################
- set -g status-utf8 on # enable UTF-8 support in status bar
- set -g status-interval 30 # set refresh interval for status bar
- set -g status-justify left # left justify status bar
- set -g status-left-length 40 #
- # show session, window, pane in left status bar
- set -g status-left '#[fg=green]#S#[fg=blue] #I:#P#[default]'
- # show hostname, date, time, and battery in right status bar
- set -g status-right '#[fg=blue]#H#[default] %Y-%m-%d %H:%M '
- set -g terminal-overrides 'xterm*:smcup@:rmcup@'
- ###########################
- # Colors
- ###########################
- # color status bar
- set -g status-bg colour235
- set -g status-fg white
- # set color of active pane
- set -g pane-border-fg colour235
- set -g pane-border-bg black
- set -g pane-active-border-fg green
- set -g pane-active-border-bg black
- # highlight current window
- setw -g window-status-current-fg black
- setw -g window-status-current-bg green
- setw -g automatic-rename on
- ###########################
- # Key bindings
- ###########################
- unbind M-l ; bind M-l list-panes
- unbind M-r ; bind M-r source-file ~/.tmux.conf
- unbind M-c ; bind M-c new-window
- unbind M-d ; bind M-d detach-client
- unbind M-h ; bind M-h select-layout even-horizontal
- unbind M-v ; bind M-v select-layout even-vertical
- unbind M-t ; bind M-t select-layout tiled
- unbind M-n ; bind M-n select-layout main-vertical
- unbind M-m ; bind M-m select-layout main-horizontal
- unbind Space ; bind Space copy-mode
- bind -n M-n next
- bind -n M-p prev
- bind -n M-z resize-pane -Z
- bind -n M-, split-window -v
- bind -n M-. split-window -h
- # Pane switching: vi style
- bind -n M-h select-pane -L
- bind -n M-j select-pane -D
- bind -n M-k select-pane -U
- bind -n M-l select-pane -R
- # Pane switching: arrows
- bind -n M-Left select-pane -L
- bind -n M-Down select-pane -D
- bind -n M-Up select-pane -U
- bind -n M-Right select-pane -R
- # Shift arrow to switch windows
- bind -n S-Left previous-window
- bind -n S-Right next-window
- # Make vi mode behave more like vi
- bind -t vi-copy 'v' begin-selection
- bind -t vi-copy 'y' copy-selection
- bind -t vi-copy Home start-of-line
- bind -t vi-copy End end-of-line
- bind -t vi-copy Escape cancel
- bind -t vi-copy q cancel
- # Enter copy mode and scroll one page up with Alt-PageUp
- bind -n M-PPage copy-mode -u
- ###########################
- # Mouse
- ###########################
- set -g mode-mouse off
- set -g mouse-resize-pane off
- set -g mouse-select-pane off
- set -g mouse-select-window off
- ## Toggle mouse mode on
- bind M-r \
- set -g mode-mouse on \;\
- set -g mouse-resize-pane on \;\
- set -g mouse-select-pane on \;\
- set -g mouse-select-window on \;\
- #
- ## Toggle mouse mode off
- bind M-w \
- set -g mode-mouse off \;\
- set -g mouse-resize-pane off \;\
- set -g mouse-select-pane off \;\
- set -g mouse-select-window off \;\
- # Enable Shift-PgUp/PgDown for scrolling
- #set -g terminal-overrides 'xterm*:smcup@:rmcup@'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement