Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sjourdan
Created October 22, 2015 08:52
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 sjourdan/2b17811eb8c37f7220bd to your computer and use it in GitHub Desktop.
Save sjourdan/2b17811eb8c37f7220bd to your computer and use it in GitHub Desktop.
tmux.conf
set -g default-terminal 'screen-256color'
set -g prefix C-a
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind C-a send-prefix
bind | split-window -h
bind - split-window -v
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# setw -g mode-mouse on
# set -g mouse-select-pane on
# set -g mouse-resize-pane on
# set -g mouse-select-window on
set-option -g -q mouse on
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow
set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
set -g status-right "#[fg=cyan]%d %b %R"
set -g message-fg white
set -g message-bg black
set -g message-attr bright
set -g status-fg white
set -g status-bg black
set -g status-utf8 on
set -g status-interval 60
set -g status-justify centre
setw -g monitor-activity on
set -g visual-activity on
setw -g mode-keys vi
# set -g default-command "reattach-to-user-namespace -l /bin/bash"
set -g default-shell /usr/local/bin/zsh
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer"
# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @tpm_plugins " \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-resurrect \
nhdaly/tmux-scroll-copy-mode \
"
# Other examples:
# github_username/plugin_name \
# git@github.com/user/plugin \
# git@bitbucket.com/user/plugin \
# initializes TMUX plugin manager
run-shell ~/.tmux/plugins/tpm/tpm
set-window-option -g window-style 'bg=#181818'
set-window-option -g window-active-style 'bg=black'
set-window-option -g pane-active-border-style ''
@sjourdan
Copy link
Author

sjourdan commented Nov 5, 2015

tmux >= 2.1 w/mouse scrolling

set -g default-terminal 'screen-256color'

set -g prefix C-a
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind C-a send-prefix
bind | split-window -h
bind - split-window -v
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

bind -r C-h select-window -t :- 
bind -r C-l select-window -t :+

bind -r H resize-pane -L 5 
bind -r J resize-pane -D 5 
bind -r K resize-pane -U 5 
bind -r L resize-pane -R 5

# setw -g mode-mouse on
# set -g mouse-select-pane on 
# set -g mouse-resize-pane on 
# set -g mouse-select-window on
set-option -g -q mouse on

setw -g window-status-fg cyan 
setw -g window-status-bg default 
setw -g window-status-attr dim

setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright

set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white 
set -g pane-active-border-bg yellow

set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
set -g status-right "#[fg=cyan]%d %b %R"

set -g message-fg white 
set -g message-bg black 
set -g message-attr bright

set -g status-fg white 
set -g status-bg black

set -g status-utf8 on
set -g status-interval 60

set -g status-justify centre

setw -g monitor-activity on 
set -g visual-activity on

setw -g mode-keys vi

# set -g default-command "reattach-to-user-namespace -l /bin/bash"
set -g default-shell /usr/local/bin/zsh
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer"

# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @tpm_plugins "              \
  tmux-plugins/tpm                 \
  tmux-plugins/tmux-sensible       \
    tmux-plugins/tmux-resurrect   \
  nhdaly/tmux-scroll-copy-mode  \
"
# Other examples:
# github_username/plugin_name    \
# git@github.com/user/plugin     \
# git@bitbucket.com/user/plugin  \

# initializes TMUX plugin manager
run-shell ~/.tmux/plugins/tpm/tpm

set-window-option -g window-style 'bg=#181818'
set-window-option -g window-active-style 'bg=black'
set-window-option -g pane-active-border-style ''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment