Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 126 lines (111 sloc) 4.18 KB
## keybindings
unbind C-b
unbind C-a
unbind %
unbind ,
unbind .
unbind n
unbind p
unbind [
unbind '"'
unbind l
unbind &
unbind "'"
#unbind -T root WheelUpPane
#unbind -T root WheelDownPane
set -g prefix C-a
bind | split-window -h
bind - split-window -v
bind x kill-pane
bind X kill-window
bind -n C-_ display-panes \; select-pane -t :.
if-shell 'test "$(uname)" = "Darwin"' 'bind -n "KP*" resize-pane -Z'
if-shell 'test "$(uname)" = "Linux"' 'bind -n "C-y" resize-pane -Z'
bind , previous-window # <
bind . next-window # >
bind < swap-window -t :-
bind > swap-window -t :+
bind n command-prompt 'rename-window %%'
bind N command-prompt 'rename-session %%'
bind Escape copy-mode
bind r source-file ~/.tmux.conf; display " ✱ ~/.tmux.conf is reloaded"
bind R refresh-client
bind a send-key C-a
bind C-a last-window
bind C-j resize-pane -L 5
bind C-l resize-pane -R 5
bind C-k resize-pane -D 5
bind C-i resize-pane -U 5
bind s send-prefix
bind w split-window "tmux lsw | selecta | cut -d':' -f 1 | xargs tmux select-window -t"
setw -g mouse on
bind-key -T root -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' \"send-keys -M ; send-keys -M ; send-keys -M ;\" \"copy-mode -t=\""
bind-key -T root -n WheelDownPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' \"send-keys -M ; send-keys -M ; send-keys -M ;\" \"send-keys -M ; send-keys -M ; send-keys -M ;\""
bind -t vi-copy v begin-selection
if-shell 'test "$(uname)" = "Darwin"' 'bind -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"'
if-shell 'test "$(uname)" = "Linux"' 'bind -t vi-copy y copy-pipe "xsel -i -p -b"'
unbind -t vi-copy Enter
if-shell 'test "$(uname)" = "Darwin"' 'bind -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"'
if-shell 'test "$(uname)" = "Linux"' 'bind -t vi-copy Enter copy-pipe "xsel -i -p -b"'
# basic options
set -g default-terminal "screen-256color"
set -g status-keys vi
setw -g mode-keys vi
set -g bell-action none
set -g visual-bell off
set -g base-index 1
set -g pane-base-index 1 # start pane indices at 1
set -sg escape-time 0
# look and feel
#set -g status-left '#[fg=red]#H#[fg=green]:#[fg=white]#S #[fg=green]][#[default]'
#set -g status-right '#[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
## set status bar
set -g status-bg colour11
set -g status-fg colour8
set -g default-shell $SHELL
if-shell 'test "$(uname)" = "Darwin"' 'set -g default-command "shell > /dev/null 2>&1; /usr/local/bin/reattach-to-user-namespace -l /usr/local/bin/zsh"'
if-shell 'test "$(uname)" = "Linux"' 'set -g default-command "/usr/bin/zsh"'
set-option -g renumber-windows on
set -g status-bg cyan
setw -g window-status-current-bg green
setw -g window-status-current-attr bold
set -g set-titles on
set -g set-titles-string '#S:#I #W' # window number,program name,active (or not)
setw -g automatic-rename off # auto name
set -g allow-rename off # auto name
set -g focus-events on
set -g status-justify left
set -g status-bg black
set -g status-fg cyan
set -g status-interval 5
set -g status-left ' #[bold]❐ #S#[default] ⡇'
set -g status-right '#[bold]#(whoami) ● #H#[default] '
set -g status-right-length 60
set -g status-left-length 60
setw -g window-status-current-fg white
## highlight active window
set-window-option -g window-status-current-bg colour166
set-window-option -g window-status-current-fg colour15
set-window-option -g window-status-current-attr bold
set-window-option -g pane-active-border-style ''
#set-window-option -g window-status-current-format ' #I #W '
## pane border and colors
set -g pane-active-border-fg yellow
set -g pane-border-fg white
setw -g mode-bg magenta
setw -g mode-fg black
set -g message-bg magenta
set -g message-fg black
#setw -g automatic-rename
set -g @resurrect-processes ':all:'
set -g @resurrect-strategy-vim 'session'
set -g @continuum-save-interval '0'
# List of plugins
# Supports `github_username/repo` or full git repo URLs
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-continuum \
tmux-plugins/tmux-copycat \
run-shell '~/.tmux/plugins/tpm/tpm'