165 lines
5.0 KiB
Bash
165 lines
5.0 KiB
Bash
# Moving between panes.
|
|
bind h select-pane -L
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
bind l select-pane -R
|
|
|
|
# Splitting panes
|
|
bind | split-window -h
|
|
bind - split-window -v
|
|
|
|
# Moving between windows.
|
|
# Provided you've mapped your `CAPS LOCK` key to the `CTRL` key,
|
|
# you can now move between panes without moving your hands off the home row.
|
|
bind -r C-h select-window -t :-
|
|
bind -r C-l select-window -t :+
|
|
|
|
# Pane resizing.
|
|
bind -r H resize-pane -L 5
|
|
bind -r J resize-pane -D 5
|
|
bind -r K resize-pane -U 5
|
|
bind -r L resize-pane -R 5
|
|
|
|
# reorder windows.
|
|
bind-key -n C-S-Left swap-window -t -1
|
|
bind-key -n C-S-Right swap-window -t +1
|
|
|
|
# Remove the delay for the escape key so vim is usable
|
|
set -g escape-time 0
|
|
|
|
# Set the default terminal mode to 256color mode.
|
|
set -g default-terminal "screen-256color"
|
|
|
|
# Enable activity alerts.
|
|
setw -g monitor-activity on
|
|
set -g visual-activity on
|
|
|
|
# Pane colors.
|
|
set -g pane-border-style fg="green",bg="black"
|
|
set -g pane-active-border-style fg="white",bg="yellow"
|
|
|
|
# Command / message line.
|
|
set -g message-style bright,fg="white",bg="black"
|
|
|
|
# Enable vi keys.
|
|
setw -g mode-keys vi
|
|
|
|
# Copy/paste vim binding
|
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
|
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
|
|
|
|
# Status bar
|
|
# set -g status-left-length 52
|
|
# set -g status-right-length 451
|
|
# set -g status-style fg="white",bg="colour234"
|
|
# set -g window-status-activity-style bold
|
|
# set -g pane-border-style fg="colour245"
|
|
# set -g pane-active-border-style fg="colour39"
|
|
# set -g message-style bold,fg="colour16",bg="colour221"
|
|
# set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S#[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(hostname)#[fg=colour238,bg=colour234,nobold]⮀'
|
|
# set -g status-right "#[fg=colour39, bg=colour234]⮂#[fg=colour234,bg=colour39] 🐳 "
|
|
# set -g window-status-format "#[fg=white,bg=colour234] #I #W "
|
|
# set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W#[fg=colour39,bg=colour234,nobold]⮀"
|
|
|
|
# Enable xterm-style key sequences and modifiers
|
|
set-option -g xterm-keys on
|
|
set -s extended-keys on
|
|
|
|
# Set terminal overrides for Ctrl+Shift support
|
|
set -g terminal-overrides "*:kUP5=\e[1;5A,*:kDN5=\e[1;5B,*:kLFT5=\e[1;5D,*:kRIT5=\e[1;5C,*:kUP6=\e[1;6A,*:kDN6=\e[1;6B,*:kLFT6=\e[1;6D,*:kRIT6=\e[1;6C"
|
|
|
|
set -s user-keys[0] "\e[80;6u"
|
|
bind-key -n User0 send-keys C-S-p
|
|
bind-key -n User0 send-keys C-S-h
|
|
bind-key -n User0 send-keys C-S-j
|
|
bind-key -n User0 send-keys C-S-k
|
|
bind-key -n User0 send-keys C-S-l
|
|
bind-key -n User0 send-keys C-S-b
|
|
bind-key -n User0 send-keys C-S-q
|
|
bind-key -n User0 send-keys C-S-s
|
|
bind-key -n User0 send-keys C-S-o
|
|
bind-key -n User0 send-keys C-S-y
|
|
bind-key -n User0 send-keys C-S-a
|
|
|
|
# Prefix
|
|
set -g prefix C-Space
|
|
set -g prefix2 C-b
|
|
bind C-Space send-prefix
|
|
|
|
# Reload config
|
|
bind q source-file ~/.config/tmux/tmux.conf
|
|
|
|
# Pane Controls
|
|
bind x kill-pane
|
|
|
|
bind -n C-M-Left select-pane -L
|
|
bind -n C-M-Right select-pane -R
|
|
bind -n C-M-Up select-pane -U
|
|
bind -n C-M-Down select-pane -D
|
|
|
|
bind -n C-M-S-Left resize-pane -L 5
|
|
bind -n C-M-S-Down resize-pane -D 5
|
|
bind -n C-M-S-Up resize-pane -U 5
|
|
bind -n C-M-S-Right resize-pane -R 5
|
|
|
|
# Window navigation
|
|
bind r command-prompt -I "#W" "rename-window -- '%%'"
|
|
bind c new-window -c "#{pane_current_path}"
|
|
|
|
bind -n M-1 select-window -t 1
|
|
bind -n M-2 select-window -t 2
|
|
bind -n M-3 select-window -t 3
|
|
bind -n M-4 select-window -t 4
|
|
bind -n M-5 select-window -t 5
|
|
bind -n M-6 select-window -t 6
|
|
bind -n M-7 select-window -t 7
|
|
bind -n M-8 select-window -t 8
|
|
bind -n M-9 select-window -t 9
|
|
|
|
bind -n M-Left select-window -t -1
|
|
bind -n M-Right select-window -t +1
|
|
bind -n M-S-Left swap-window -t -1 \; select-window -t -1
|
|
bind -n M-S-Right swap-window -t +1 \; select-window -t +1
|
|
|
|
# Session controls
|
|
bind R command-prompt -I "#S" "rename-session -- '%%'"
|
|
bind C new-session -c "#{pane_current_path}"
|
|
bind X kill-session
|
|
bind P switch-client -p
|
|
bind N switch-client -n
|
|
|
|
bind -n M-Up switch-client -p
|
|
bind -n M-Down switch-client -n
|
|
|
|
# General
|
|
set -g mouse on
|
|
set -g base-index 1
|
|
setw -g pane-base-index 1
|
|
set -g renumber-windows on
|
|
set -g history-limit 50000
|
|
set -g focus-events on
|
|
set -g set-clipboard on
|
|
set -g allow-passthrough on
|
|
setw -g aggressive-resize on
|
|
set -g detach-on-destroy off
|
|
|
|
# Status bar
|
|
set -g status-position top
|
|
set -g status-interval 5
|
|
set -g status-left-length 30
|
|
set -g status-right-length 50
|
|
set -g window-status-separator ""
|
|
|
|
# Theme
|
|
set -g status-style "bg=default,fg=default"
|
|
set -g status-left "#[fg=black,bg=blue,bold] #S #[bg=default] "
|
|
set -g status-right "#[fg=blue]#{?client_prefix,PREFIX ,}#{?window_zoomed_flag,ZOOM ,}#[fg=brightblack]#h "
|
|
set -g window-status-format "#[fg=brightblack] #I:#W "
|
|
set -g window-status-current-format "#[fg=blue,bold] #I:#W "
|
|
set -g pane-border-style "fg=brightblack"
|
|
set -g pane-active-border-style "fg=blue"
|
|
set -g message-style "bg=default,fg=blue"
|
|
set -g message-command-style "bg=default,fg=blue"
|
|
set -g mode-style "bg=blue,fg=black"
|
|
setw -g clock-mode-colour blue
|