all repos — dotfiles @ 816b900c50a953bed3bce77c89b941ac18c6ff79

linux dotfiles

tmux/tmux.conf (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
set-option -g prefix C-f
unbind-key C-b
bind-key C-f send-prefix
set escape-time 0

bind C-c new-session

# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."

bind h select-pane -L 
bind j select-pane -D 
bind k select-pane -U 
bind l select-pane -R 
bind > swap-pane -D      
bind < swap-pane -U      

bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2

bind -r C-h swap-window -t -1 \; previous-window
bind -r C-l swap-window -t +1 \; next-window

bind \; last-window
bind C-o rotate-window

setw -g mouse on

bind-key P command-prompt -p 'save history to filename:' -I '~/.cache/tmux.history' 'capture-pane -S - ; save-buffer %1 ; delete-buffer'

bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"

# smart pane switching with awareness of vim splits
# bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-h) || tmux select-pane -L"
# bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-j) || tmux select-pane -D"
# bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-k) || tmux select-pane -U"
# bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-l) || tmux select-pane -R"

# set -g default-terminal "tmux-256color"
# set -g terminal-overrides ",tmux-256color:Tc"
# set -as terminal-overrides ',st*:Ss@'
set -g default-terminal "screen-256color"

# Status update interval
# set -g status-interval 1

# Basic status bar colors
set -g status-style fg=colour250,bg=colour233

# Left side of status bar
set -g status-left-style bg=colour233,fg=colour243
set -g status-left-length 0
set -g status-left "#[fg=colour240] #S "
# set -g status-left "#[fg=colour232,bg=colour24,bold] #S #[fg=colour24,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233,nobold]"

# Right side of status bar
set -g status-right-style bg=colour233,fg=colour243
set -g status-right-length 0
set -g status-right ""
# set -g status-right "#[fg=colour240] %a, %b %d | %I:%M %P "
# set -g status-right "#[fg=colour235,bg=colour233]#[fg=colour240,bg=colour235] %I:%M #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour245,bg=colour240]#[fg=colour232,bg=colour245,bold] #H "

# Window status
set -g window-status-format " #I:#W#F "
set -g window-status-current-format " #I:#W#F "

# Current window status
set -g window-status-current-style bg=colour253,fg=colour233

# Window with activity status
set -g window-status-activity-style bg=colour233,fg=colour31

# Window separator
set -g window-status-separator ""

# Window status alignment
set -g status-justify centre

set -g status-position bottom

# Pane border
set -g pane-border-style bg=default,fg=colour236

# Active pane border
set -g pane-active-border-style bg=default,fg=colour244

# Pane number indicator
set -g display-panes-colour colour233
set -g display-panes-active-colour colour245

# Clock mode
set -g clock-mode-colour colour24
set -g clock-mode-style 24

# Message
set -g message-style bg=colour233,fg=colour253

# Command message
set -g message-command-style bg=colour233,fg=black

# Mode
set -g mode-style bg=colour253,fg=colour231

# this allows the cursor to change when within st
# https://vi.stackexchange.com/questions/22224/change-neovim-cursor-in-insert-mode-under-st-simple-terminal-and-tmux
set -as terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[2 q'