helm/tmux.conf

95 lines
3.6 KiB
Plaintext
Raw Normal View History

## Behavior ###############
2013-03-17 19:23:39 -07:00
# Zero-based indexing is fine in programming languages, but not so much in
# a multiplexer when zero is on the other side of the keyboard.
set -g base-index 1
set -g renumber-windows on
setw -g automatic-rename on
2013-03-17 19:23:39 -07:00
# Remove the <C-a> delay
set -s escape-time 0
2014-08-12 22:19:03 -07:00
# 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 off
# go zsh, go
# set-option -g default-shell $SHELL
2013-03-21 07:52:15 -07:00
# a mouse
set -g mode-mouse on
setw -g mouse-select-window on
setw -g mouse-select-pane on
## Key bindings ###########
# Remap the key prefix
2014-08-12 23:46:29 -07:00
set -g prefix C-Space
2013-11-22 20:24:16 -08:00
unbind C-b
2013-03-20 18:26:30 -07:00
# Restore go-to-start-of-line shortcut
2014-08-12 22:19:03 -07:00
bind C-a send-prefix
# Go to last active window
2014-08-12 22:19:03 -07:00
bind-key a last-window
# reload config without killing server
2014-08-12 22:19:03 -07:00
bind r source-file ~/.tmux.conf \; display-message " Config reloaded..".
# set vi keys
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
2013-11-22 20:24:16 -08:00
bind-key -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy"
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
2014-08-12 22:19:03 -07:00
## Pane management #####
# Better splitting keybinds
unbind %
unbind '"'
2014-08-12 23:46:29 -07:00
bind s split-window -v
bind v split-window -h
2014-08-12 22:19:03 -07:00
# Navigate between panes
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
# after copying to a tmux buffer, hit y again to copy to clipboard
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# quick view of processes
bind '~' split-window "exec top"
## Looks ########################
2014-08-12 22:19:03 -07:00
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
2013-03-17 19:23:39 -07:00
# default statusbar colors
2013-11-22 20:24:16 -08:00
set-option -g status-bg '#333333'
2013-03-17 19:23:39 -07:00
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
2013-03-17 19:23:39 -07:00
# active window title colors
2013-03-20 18:23:05 -07:00
set-window-option -g window-status-current-fg white #orange
2013-03-17 19:23:39 -07:00
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr bright
2013-03-17 19:23:39 -07:00
# 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 black #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 ###################
2014-08-12 22:19:03 -07:00
set-option -g status-justify left
2013-11-22 20:24:16 -08:00
set-option -g status-right-length 60
set-option -g status-left-length 60
2014-08-12 22:19:03 -07:00
set-option -g status-left '#[bg=#252525] #[fg=white]#[bold]#S #[default]'
set-option -g status-right '#[bg=#383838] #(whoami) : #H '