Skip to content

Instantly share code, notes, and snippets.

@eyalzek
Last active August 29, 2015 14:12
Show Gist options
  • Save eyalzek/df74a0817c8aca68c31c to your computer and use it in GitHub Desktop.
Save eyalzek/df74a0817c8aca68c31c to your computer and use it in GitHub Desktop.
tmux config, should go in your home dir
# Set the prefix to ^A.
unbind-key C-b
set -g prefix C-a
bind a send-prefix
# Turn mouse mode operations on
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 on with prefix m
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 with prefix M
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'
# Set zsh as default shell
# set-option -g default-shell /usr/bin/zsh
# Kill the current session
bind K kill-session
# Enter copy mode with 'C-[', start selection with 'v', copy to buffer with 'y'
setw -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# Copy buffer to clipboard
bind y run-shell "tmux show-buffer | xclip -sel clip -i" \; display-message "Copied tmux buffer to system clipboard"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment