Skip to content

Instantly share code, notes, and snippets.

@radarek
Created November 7, 2013 09:32
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 radarek/7351777 to your computer and use it in GitHub Desktop.
Save radarek/7351777 to your computer and use it in GitHub Desktop.
set -g default-terminal "screen-256color"
setw -g mode-keys vi
set-option -g set-titles on
set-option -g set-titles-string '[#S:#I #H] #W' # use screen title
# copy, paste buffer
bind p paste-buffer
bind [ copy-mode
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy r rectangle-toggle
# History
set -g history-limit 100000
unbind x
bind x confirm-before -p "kill-session #S? (y/n)" kill-session
# panes
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
# command line
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# colours
set -g status-utf8 on
set -g status-bg colour234
set -g status-fg white
set -g status-left-length 40
set -g status-left-fg black
set -g status-left-bg white
set -g status-left ' #(whoami)@#20H #[fg=colour17,bold]#S#[fg=black,nobright]#[fg=white] '
set -g status-right-bg default
set -g status-right-fg colour71
set -g status-right '%H:%M '
# window status
setw -g window-status-fg colour247
setw -g window-status-bg default
setw -g window-status-attr dim
# curren window status
setw -g window-status-current-fg colour231
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
setw -g monitor-activity off
set -g visual-activity off
set -g prefix C-a
unbind C-b
set -sg escape-time 1
set -g repeat-time 500
set -g base-index 1
setw -g pane-base-index 1
# PREFIX r - reload configuration
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# press twice C-a to send to application
bind C-a send-prefix
# split panes
bind | split-window -h
bind - split-window -v
bind _ split-window -v
# moving through panes
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# moving through windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
bind -r left select-window -t :-
bind -r right select-window -t :+
# resizing windows
bind -r H resize-pane -L 3
bind -r J resize-pane -D 1
bind -r K resize-pane -U 1
bind -r L resize-pane -R 3
source-file ~/.tmux.conf.local
# Mac OSX copy/paste functionality
# brew install reattach-to-user-namespace
# copy, paste buffer
# http://robots.thoughtbot.com/post/55885045171/tmux-copy-paste-on-os-x-a-better-future
bind -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
unbind -t vi-copy Enter
bind -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment