Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (65 sloc) 1.91 KB
#Copied from github.com/joshuaclayton
# JW: not sure what is dependant on zsh here
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
# set-option -g default-command "reattach-to-user-namespace -l bash"
set -g default-terminal "screen-256color"
set -g history-limit 20000
# start session indexing at 1
set -g base-index 1
# use VI
set-window-option -g mode-keys vi
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M set-window-option -g mode-mouse on
# Use ctrl-w instead of ctrl-b
set -g prefix C-w
unbind C-b
bind C-w send-prefix
# reload config
unbind r
bind r source-file ~/.tmux.conf
unbind ^T
bind ^T split-window -p 25
# horizontal and vertical splits
unbind |
bind | split-window -h
unbind _
bind _ split-window
# tile all windows
unbind =
bind = select-layout tiled
# cycle through panes
unbind ^A
bind ^A select-pane -t :.+
unbind Right
bind Right resize-pane -R 8
unbind Left
bind Left resize-pane -L 8
unbind Up
bind Up resize-pane -U 4
unbind Down
bind Down resize-pane -D 4
unbind h
bind h select-pane -L
unbind j
bind j select-pane -D
unbind k
bind k select-pane -U
unbind l
bind l select-pane -R
# status bar
set -g status-bg black
set -g status-fg white
set -g status-interval 1
set -g status-right-length 60
set -g status-left ' '
set -g status-right '#(battery-life) (#(battery-time)) #[fg=yellow]%Y-%m-%d %H:%M#[default] '
set-window-option -g window-status-current-bg yellow
set-window-option -g window-status-current-fg black