68 lines
1.7 KiB
Bash
68 lines
1.7 KiB
Bash
#change C-b to Ca
|
|
unbind C-b
|
|
set-option -g prefix C-a
|
|
bind-key C-a send-prefix
|
|
|
|
# split panes using | and -
|
|
bind | split-window -h
|
|
bind - split-window -v
|
|
unbind '"'
|
|
unbind %
|
|
|
|
# stop tmux from renaming the window every time you run a command
|
|
set-option -g allow-rename off
|
|
set-option -g pane-active-border-fg blue
|
|
|
|
# select panes with vim keys
|
|
bind h select-pane -L
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
bind l select-pane -R
|
|
|
|
# change base from 0 to 1 for reachability
|
|
set -g base-index 1
|
|
|
|
# set vi modes
|
|
set -g status-keys vi
|
|
set -g mode-keys vi
|
|
|
|
# enable mouse control (click wind, panes, resizable panes) - as of tmux 2.1
|
|
# copy/paste: shift+left click to highlight, then shift+middle to past
|
|
if-shell '[ $(echo "$(tmux -V | cut -d" " -f2) >= 2.1" | bc) -eq 1 ]' \
|
|
'set -g mouse on' \
|
|
'set -g mode-mouse on; set -g mouse-resize-pane on; set -g mouse-select-pane on; set -g mouse-select-window on'
|
|
|
|
bind-key Tab last-window
|
|
bind-key BTab previous-window
|
|
|
|
#nested tmux
|
|
set -g status-bg colour40
|
|
setw -g window-status-current-bg colour40
|
|
|
|
bind -n C-t new-window -a
|
|
bind -n S-left prev
|
|
bind -n S-right next
|
|
bind -n S-C-left swap-window -t -1
|
|
bind -n S-C-right swap-window -t +1
|
|
|
|
bind -n M-F11 set -qg status-bg colour25
|
|
bind -n M-F12 set -qg status-bg colour40
|
|
bind -n S-up \
|
|
send-keys M-F12 \; \
|
|
set -qg status-bg colour25 \; \
|
|
unbind -n S-left \; \
|
|
unbind -n S-right \; \
|
|
unbind -n S-C-left \; \
|
|
unbind -n S-C-right \; \
|
|
unbind -n C-t \; \
|
|
set -qg prefix C-b
|
|
bind -n S-down \
|
|
send-keys M-F11 \; \
|
|
set -qg status-bg colour40 \; \
|
|
bind -n S-left prev \; \
|
|
bind -n S-right next \; \
|
|
bind -n S-C-left swap-window -t -1 \; \
|
|
bind -n S-C-right swap-window -t +1 \; \
|
|
bind -n C-t new-window -a -c "#{pane_current_path}" \; \
|
|
set -qg prefix C-a
|