Skip to content

Instantly share code, notes, and snippets.

@Nifled
Created June 26, 2017 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nifled/915180900402b3ee833fcc94d373f793 to your computer and use it in GitHub Desktop.
Save Nifled/915180900402b3ee833fcc94d373f793 to your computer and use it in GitHub Desktop.
# Use C-a as prefix and free C-b
set -g prefix C-a
unbind C-b
# Send C-a to application by pressing it twice
bind C-a send-prefix
# Reload configuration file
unbind r
bind r source-file ~/.tmux.conf \; display "Configration file .tmux reloaded!"
# Redefine splitting shortcuts
bind | split-window -h \; display "Splitting Vertical"
bind - split-window -v \; display "Splitting Horizontal"
# Enable mouse mode and pane selection
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
# Toggle mouse on
bind m \
set -g mode-mouse on \;\
set -g mouse-resize-pane on \;\
set -g mouse-select-pane on \;\
set -g mouse-select-window on \;\
display 'Mouse: ON'
# Toggle mouse off
bind M \
set -g mode-mouse off \;\
set -g mouse-resize-pane off \;\
set -g mouse-select-pane off \;\
set -g mouse-select-window off \;\
display 'Mouse: OFF'
# Titles (window number, program name, active (or not)
set-option -g set-titles on
set-option -g set-titles-string '#H:#S.#I.#P #W #T'
# Pane Selection
bind -n C-left select-pane -L
bind -n C-down select-pane -D
bind -n C-up select-pane -U
bind -n C-right select-pane -R
# Sync tmux panes (replicates input from one pane to the others)
bind p setw synchronize-panes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment