|
|
@ -2,18 +2,15 @@
|
|
|
|
set -g default-terminal "screen-256color-italic"
|
|
|
|
set -g default-terminal "screen-256color-italic"
|
|
|
|
|
|
|
|
|
|
|
|
# zsh
|
|
|
|
# zsh
|
|
|
|
set-option -g default-shell $SHELL
|
|
|
|
set -g default-shell $SHELL
|
|
|
|
|
|
|
|
|
|
|
|
# bind default prefix to ctrl-a
|
|
|
|
# bind default prefix to ctrl-a
|
|
|
|
set -g prefix C-a
|
|
|
|
set -g prefix C-a
|
|
|
|
unbind-key C-b
|
|
|
|
unbind-key C-b
|
|
|
|
bind-key a send-prefix
|
|
|
|
bind-key a send-prefix
|
|
|
|
|
|
|
|
|
|
|
|
# reparing copy & paste by default
|
|
|
|
|
|
|
|
set-option -g default-command "reattach-to-user-namespace -l zsh"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# more history
|
|
|
|
# more history
|
|
|
|
set-option -g history-limit 10000
|
|
|
|
set -g history-limit 10000
|
|
|
|
|
|
|
|
|
|
|
|
# Fix for sending keys to Vim
|
|
|
|
# Fix for sending keys to Vim
|
|
|
|
setw -g xterm-keys on
|
|
|
|
setw -g xterm-keys on
|
|
|
@ -24,20 +21,15 @@ set -sg escape-time 50
|
|
|
|
# use vim motions :-)
|
|
|
|
# use vim motions :-)
|
|
|
|
setw -g mode-keys vi
|
|
|
|
setw -g mode-keys vi
|
|
|
|
|
|
|
|
|
|
|
|
# reparing copy & paste
|
|
|
|
|
|
|
|
# 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"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Force a reload of te config file
|
|
|
|
# Force a reload of te config file
|
|
|
|
unbind-key r
|
|
|
|
unbind-key r
|
|
|
|
bind-key r source-file ~/.tmux.conf \; display-message "Configuration reloaded!"
|
|
|
|
bind-key r source-file ~/.tmux.conf \; display-message "Configuration reloaded!"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Copy & Paste with clipper -- see https://github.com/wincent/clipper
|
|
|
|
|
|
|
|
# starting copy & paste with Ctrl+a [
|
|
|
|
|
|
|
|
bind-key -t vi-copy v begin-selection
|
|
|
|
|
|
|
|
bind-key -t vi-copy y copy-pipe "nc localhost 8377"
|
|
|
|
|
|
|
|
|
|
|
|
# Saner window splitting / new windows
|
|
|
|
# Saner window splitting / new windows
|
|
|
|
bind-key \ split-window -h -c "#{pane_current_path}"
|
|
|
|
bind-key \ split-window -h -c "#{pane_current_path}"
|
|
|
|
bind-key - split-window -v -c "#{pane_current_path}"
|
|
|
|
bind-key - split-window -v -c "#{pane_current_path}"
|
|
|
@ -53,19 +45,21 @@ bind-key -r C-k resize-pane -U
|
|
|
|
bind-key -r C-h resize-pane -L
|
|
|
|
bind-key -r C-h resize-pane -L
|
|
|
|
bind-key -r C-l resize-pane -R
|
|
|
|
bind-key -r C-l resize-pane -R
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Smart pane switching with awareness of vim splits
|
|
|
|
# Smart pane switching with awareness of vim splits
|
|
|
|
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
|
|
|
|
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
|
|
|
|
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
|
|
|
|
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
|
|
|
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
|
|
|
|
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
|
|
|
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
|
|
|
|
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
|
|
|
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|n?vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
|
|
|
|
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
|
|
|
|
|
|
|
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Mouse support
|
|
|
|
# Mouse support
|
|
|
|
set -g mode-mouse on
|
|
|
|
set -g mode-mouse on
|
|
|
|
set-option -g mouse-select-pane on
|
|
|
|
set -g mouse-select-pane on
|
|
|
|
set-option -g mouse-select-window on
|
|
|
|
set -g mouse-select-window on
|
|
|
|
set-option -g mouse-resize-pane on
|
|
|
|
set -g mouse-resize-pane on
|
|
|
|
|
|
|
|
|
|
|
|
# counting panes starts at 1
|
|
|
|
# counting panes starts at 1
|
|
|
|
set -g base-index 1
|
|
|
|
set -g base-index 1
|
|
|
@ -76,20 +70,20 @@ set -g display-time 2000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# statusbar colors solarized dark
|
|
|
|
# statusbar colors solarized dark
|
|
|
|
set-option -g status-bg black
|
|
|
|
set -g status-bg black
|
|
|
|
set-option -g status-fg yellow
|
|
|
|
set -g status-fg yellow
|
|
|
|
set-option -g status-attr default
|
|
|
|
set -g status-attr default
|
|
|
|
set-window-option -g window-status-fg brightblue
|
|
|
|
set -g pane-border-fg black
|
|
|
|
set-window-option -g window-status-bg default
|
|
|
|
set -g pane-active-border-fg brightgreen
|
|
|
|
set-window-option -g window-status-current-fg brightred
|
|
|
|
set -g message-bg black
|
|
|
|
set-window-option -g window-status-current-bg default
|
|
|
|
set -g message-fg brightred
|
|
|
|
set-option -g pane-border-fg black
|
|
|
|
set -g display-panes-active-colour blue
|
|
|
|
set-option -g pane-active-border-fg brightgreen
|
|
|
|
set -g display-panes-colour brightred
|
|
|
|
set-option -g message-bg black
|
|
|
|
setw -g window-status-fg brightblue
|
|
|
|
set-option -g message-fg brightred
|
|
|
|
setw -g window-status-bg default
|
|
|
|
set-option -g display-panes-active-colour blue
|
|
|
|
setw -g window-status-current-fg brightred
|
|
|
|
set-option -g display-panes-colour brightred
|
|
|
|
setw -g window-status-current-bg default
|
|
|
|
set-window-option -g clock-mode-colour green
|
|
|
|
setw -g clock-mode-colour green
|
|
|
|
|
|
|
|
|
|
|
|
# Custom status bar - with Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤
|
|
|
|
# Custom status bar - with Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤
|
|
|
|
set -g status-left-length 32
|
|
|
|
set -g status-left-length 32
|
|
|
|