Permalink
Switch branches/tags
Nothing to show
Find file
ef318fb Sep 17, 2014
146 lines (110 sloc) 3.85 KB
#---------------------------------------------------------------
# file: ~/.tmux.conf
# author: jason ryan - http://jasonwryan.com/
# vim:nu:ai:si:et:ts=4:sw=4:fdm=indent:fdn=1:ft=conf:
#---------------------------------------------------------------
#~/.tmux.conf - tmux terminal multiplexer config
# Based heavily on Thayer Wiliams' (http://cinderwick.ca)
# set prefix key to ctrl+t
set-option -g default-command "reattach-to-user-namespace -l zsh"
unbind C-b
# set -g prefix C-a
set -g prefix `
set -g default-terminal "screen-256color"
set -g mode-mouse on
set -g mouse-select-pane on
# reload config without killing server
bind r source-file ~/.tmux.conf
# more intuitive keybindings for splitting
unbind %
bind h split-window -v
unbind '"'
bind v split-window -h
# set vi keys
unbind [
bind Escape 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
# Bind prefix-y to copy-selection, save selection to buffer, and then pipe
# it's contents to pbcopy
bind-key y send-keys y\;\
save-buffer /tmp/tmux-buffer\;\
run-shell "reattach-to-user-namespace -l bash -c 'cat /tmp/tmux-buffer|pbcopy'"
# send the prefix to client inside window (ala nested sessions)
# bind-key a send-prefix
bind-key ` send-prefix
# toggle last window like screen
bind-key C-b last-window
# confirm before killing a window or the server
bind-key k confirm kill-window
bind-key K confirm kill-server
# toggle statusbar
bind-key b set-option status
# ctrl+left/right cycles thru windows
bind-key -n C-right next
bind-key -n C-left prev
# open a man page in new window
bind m command-prompt "split-window 'exec man %%'"
# quick view of processes
bind '~' split-window "exec htop"
# scrollback buffer n lines
set -g history-limit 5000
# listen for activity on all windows
set -g bell-action any
# on-screen time for display-panes in ms
set -g display-panes-time 2000
# start window indexing at one instead of zero
set -g base-index 1
# enable wm window titles
set -g set-titles on
# disable auto renaming
# setw -g automatic-rename off
# border colours
set -g pane-active-border-bg default
# wm window title string (uses statusbar variables)
set -g set-titles-string "tmux:#I [ #W ]"
# statusbar --------------------------------------------------------------
#### COLOUR (Solarized dark)
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg yellow #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg brightblue #base0
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 #base02
set-option -g pane-active-border-fg brightgreen #base01
# message text
set-option -g message-bg colour27 #base02
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
# status bar
set -g status-utf8 on
set -g status-fg colour8
set -g status-bg colour234
# current session
set -g status-left ' #S '
set -g status-left-length 15
set -g status-left-fg colour229
set -g status-left-bg colour166
# window list
set -g window-status-format "#[fg=colour8] #I #[fg=colour231]#W#[fg=colour166]#F "
set -g window-status-current-format "#[fg=colour117,bg=colour31] #I #[fg=colour231]#W#[fg=colour234]#F "
set -g window-status-separator ""
# battery and pomo status <http://git.io/zMf0IA>
set -g status-right ' #(cat ~/.pomo_stat) #(battery) '
set -g status-interval 15
set -s escape-time 50