Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
109 lines (83 sloc) 2.65 KB
## Most of these have been taken from (excluding status line)
# https://github.com/zolrath/dotfiles/blob/master/tmux.conf
# Use something easier to type as the prefix.
set -g prefix C-Space
unbind C-b
bind C-Space send-prefix
# Relax!
set -sg escape-time 0
set -sg repeat-time 600
# # This is hilariously absurd. How many nerds use tmux on OS X every day and
# # it's still fundamentally broken?
#set -g default-command "reattach-to-user-namespace -l bash"
# Less stretching to get to the first item.
set -g base-index 1
setw -g pane-base-index 1
# Reload the config.
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# unbind t
# bind t run-shell 'wemux display_users'
# increase scrollback buffer (lines)
set -g history-limit 10000
# Saner splitting.
bind v split-window -h
bind s split-window -v
# bind S choose-session \; run-shell 'sleep 5s; wemux summon'
# Pane movement
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind C-h select-pane -L
bind C-j select-pane -D
bind C-k select-pane -U
bind C-l select-pane -R
# Pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# Window movement
unbind ,
unbind .
bind -r , select-window -t :-
bind -r . select-window -t :+
# sane scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set-option -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
# Activity
setw -g monitor-activity on
set -g visual-activity off
# Autorename sanely.
setw -g automatic-rename on
# Better name management
bind C new-window \; command-prompt "rename-window '%%'"
bind n command-prompt "rename-window '%%'"
# Copy mode
setw -g mode-keys vi
bind [ copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Custom status bar
run-shell "powerline-daemon -q"
source ${POWERLINE_SRC}/bindings/tmux/powerline.conf
set -g window-status-activity-attr bold
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg colour39
set -g status-right "#(wemux status_users)"
# Switch to a different session
bind tab command-prompt "attach-session -t '%%'"
# set xterm keys to pass keys like <S-Left>
set-window-option -g xterm-keys on
# set terminal title name
set-option -g set-titles on
set-option -g set-titles-string '#S'
# quickly kill all windows in a session
unbind q
bind q run-shell "tmux list-windows | cut -d: -f1|xargs -I{} tmux send-keys -t :{} C-c C-d"