Skip to content

Instantly share code, notes, and snippets.

@simon2k
Created March 29, 2012 14:34
Show Gist options
  • Save simon2k/2238018 to your computer and use it in GitHub Desktop.
Save simon2k/2238018 to your computer and use it in GitHub Desktop.
tmux
# set default prefix
set -g prefix C-w
unbind C-b
# set start index
set -g base-index 1
# default time to repeat
set -g repeat-time 1000
# reload..
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# bind keys for split window
unbind %
bind h split-window -h
bind v split-window -v
# bind keys for move between panes
bind-key -n C-h select-pane -L
bind-key -n C-j select-pane -D
bind-key -n C-k select-pane -U
bind-key -n C-l select-pane -R
unbind o
# bind keys for resize panes
bind -r H resize-pane -L
bind -r J resize-pane -D
bind -r K resize-pane -U
bind -r L resize-pane -R
# bind keys for move betwen windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
unbind n
unbind p
# disable mouse
setw -g mode-mouse off
# set default colors
set -g default-terminal "screen-256color"
# bind keys for move in buffer
setw -g mode-keys vi
# copying text
unbind [
bind c copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# maximizing and restoring pane
bind u new-window -d -n tmp \; swap-pane -s tmp.0 \; select-window -t tmp
bind m last-window \; swap-pane -s tmp.0 \; kill-window -t tmp
# bind keys for open new window
bind n new-window
bind N new-window -d
# bind key for suspend computer
bind Q run "sudo pm-suspend"
#### COLOUR
# from https://github.com/seebi/tmux-colors-solarized.git
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour231 #base01
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
@pawel-damasiewicz
Copy link

Wow, tmux has indeed impresive configuration capabilities.

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