Skip to content

Instantly share code, notes, and snippets.

@jpoz
Created March 27, 2014 19:53
Show Gist options
  • Save jpoz/9816768 to your computer and use it in GitHub Desktop.
Save jpoz/9816768 to your computer and use it in GitHub Desktop.
# remap prefix to Control + a
unbind C-b
set -g prefix C-a
# bind C-a send-prefix
bind-key a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# default shell
set-option -g default-shell $SHELL
# colors
set -g default-terminal "screen-256color"
# start window numbering at 1 for easier switching
set -g base-index 1
# unicode
setw -g utf8 on
set -g status-utf8 on
# status bar settings
set -g status-bg blue
set -g status-fg green
set -g status-left '#h:[#S]'
set -g status-left-length 50
set -g status-right-length 50
set -g status-right " %H:%M %d-%h-%Y"
# border coloring for panes
set-option -g pane-active-border-fg colour166
# listen to alerts from all windows
set -g bell-action any
setw -g window-status-bell-bg white
setw -g window-status-bell-fg red
# quick pane cycling
# unbind ^A
# bind ^A select-pane -t :.+
# screen like window toggling
bind Tab last-window
bind Escape copy-mode
# rebind pane tiling
bind V split-window -h
bind H split-window
bind-key c new-window -n 'taco'
# bind fast session switching
unbind S
bind S command-prompt "switch -t %1"
# mouse related config
set -g mode-mouse on
setw -g mouse-select-window on
setw -g mouse-select-pane on
# vim movement bindings
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# vi copy mode
setw -g mode-keys vi
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# Allow for system clipboard use
set-option -g default-command "reattach-to-user-namespace -l zsh"
# after copying to a tmux buffer, hit y again to copy to clipboard
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"; display "Reloaded!"
# bind resize commands to keys
bind = resize-pane -D 5
bind + resize-pane -U 5
bind < resize-pane -L 5
bind > resize-pane -R 5
# jpoz clear
bind -n C-k clear-history
### COLOUR (Solarized light)
# default statusbar colors
set-option -g status-bg black #base2
set-option -g status-fg yellow #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg brightyellow #base00
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 brightred #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 black #base3
set-option -g pane-active-border-fg black #base3
# message text
set-option -g message-bg black #base2
set-option -g message-fg brightred #orange
# pane number display
set-option -g display-panes-active-colour blue #blue
set-option -g display-panes-colour brightred #orange
# clock
set-window-option -g clock-mode-colour green #green
# windows
setw -g window-status-current-format "|#I:#W|"
setw -g window-status-current-fg colour166
setw -g window-status-current-bg black
set-window-option -g automatic-rename off
#hacks
set-option -g allow-rename off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment