Skip to content

Instantly share code, notes, and snippets.

@binaryphile
Created January 29, 2015 19:00
Show Gist options
  • Save binaryphile/2557add0521f503f8a57 to your computer and use it in GitHub Desktop.
Save binaryphile/2557add0521f503f8a57 to your computer and use it in GitHub Desktop.
.tmux.conf
# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
bind-key C-a last-window
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind-key -t vi-copy 'C-v' rectangle-toggle
# Start numbering at 1
set -g base-index 1
# Allows for faster key repetition
set -s escape-time 0
# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-left ""
set -g status-right "#[fg=green]#H"
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Allows us to use C-a a <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix
# Activity monitoring
#setw -g monitor-activity on
#set -g visual-activity on
# Example of using a shell command in the status line
#set -g status-right "#[fg=yellow]#(uptime | cut -d ',' -f 2-)"
# Highlight active window
set-window-option -g window-status-current-bg red
# vi-style keys for command and window list
set -g status-keys vi
setw -g mode-keys vi
#set -g lock-command "cmatrix -ab -u 2"
#set -g lock-after-time 300
unbind +
bind + new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \; swap-pane -s tmux-zoom.0 \; select-window -t tmux-zoom
unbind -
bind - last-window \; swap-pane -s tmux-zoom.0 \; kill-window -t tmux-zoom
set-option -g update-environment 'DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY DBUS_SESSION_BUS_ADDRESS'
bind-key S choose-window 'join-pane -v -s "%%"'
bind-key V choose-window 'join-pane -h -s "%%"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment