Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
176 lines (137 sloc) 5.25 KB
# and unbind C-b to free it up
unbind C-b
set -g prefix C-a
# use send-prefix to pass C-a through to application
bind C-a send-prefix
#bind C-b send-prefix
#set-option -g default-shell /bin/zsh
#For set-titles-string, #T will display user@host:~
set -g set-titles on
set -g set-titles-string "#T"
# use UTF8, no use after tmux 2.3
# set -g utf8
# set-window-option -g utf8 on
# make tmux display things in 256 colors
#set -g default-terminal "screen-256color"
set -g default-terminal "xterm-256color"
# sane scrolling
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
# https://wiki.archlinux.org/index.php/tmux
#set -g mouse on
#bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
#bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
set -g history-limit 10240
# shorten command delay
set -sg escape-time 1
# set window and pane index to 1 (0 by default)
set-option -g base-index 1
setw -g pane-base-index 1
# reload ~/.tmux.conf using PREFIX r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Make the current window the first window
bind T swap-window -t 0
# and use C-h and C-l to cycle thru panes
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# split windows like vim. - Note: vim's definition of a horizontal/vertical split is reversed from tmux's
#unbind '"'
#unbind %
#unbind s
bind s split-window -v -c "#{pane_current_path}"
bind S split-window -v -l 40 -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind V split-window -h -l 120 -c "#{pane_current_path}"
# navigate panes with hjkl
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes using PREFIX H, J, K, L
#bind H resize-pane -L 5
#bind J resize-pane -D 5
#bind K resize-pane -U 5
#bind L resize-pane -R 5
# resize panes like vim
bind < resize-pane -L 10
bind L resize-pane -L 100
bind > resize-pane -R 10
bind R resize-pane -R 100
bind - resize-pane -D 5
bind D resize-pane -D 36
bind + resize-pane -U 5
bind U resize-pane -U 35
# swap panes
bind ^u swapp -U
bind ^d swapp -D
#urxvt tab like window switching (-n: no prior escape seq)
bind -n S-down new-window
#bind -n S-left prev
#bind -n S-right next
#bind -n C-left swap-window -t -1
#bind -n C-right swap-window -t +1
bind -n S-left swap-window -t -1
bind -n S-right swap-window -t +1
# explicitly enable mouse control
#setw -g mode-mouse on
#set-window-option -g mode-mouse on
#set -g mouse-select-pane on
#set -g mouse-resize-pane on
#set -g mouse-select-window on
# ---------------------
# Copy & Paste
# ---------------------
# provide access to the clipboard for pbpaste, pbcopy
set-window-option -g automatic-rename on
# use vim keybindings in copy mode
setw -g mode-keys vi
# setup 'v' to begin selection as in Vim
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
# update default binding of 'Enter' to also use copy-pipe
#unbind -t vi-copy Enter
# ----------------------
# Status Bar
# ----------------------
set-option -g status on # turn the status bar on
# set -g status-utf8 on # set utf-8 for the status bar
set -g status-interval 5 # set update frequencey (default 15 seconds)
set -g status-justify centre # center window list for clarity
# set-option -g status-position top # position the status bar at top of screen
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# show host name and IP address on left side of status bar
#set -g status-left-length 70
set -g status-left-length 52
set -g status-left "#[fg=green]:#h:#[fg=brightblue]#(curl icanhazip.com) #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print \"en0 \" $2}') #(ifconfig en1 | grep 'inet ' | awk '{print \"en1 \" $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') "
# show session name, window & pane number, date and time on right side of
# status bar
#set -g status-right-length 50
#set -g status-right "#[fg=yellow]#S #I:#P #[fg=yellow]:: %d %b %Y #[fg=green]:: %l:%M %p :: #(date -u | awk '{print $6}')::"
set -g status-right "#[fg=yellow]#S #I:#P #[fg=green]%Y-%m-%d#[fg=green] %H:%M"
# ----------------------
# Colors (Solarized 256)
# ----------------------
# 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 #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 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 colour240 #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