-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.old.conf
94 lines (73 loc) · 2.89 KB
/
tmux.old.conf
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
# ===============================================
# General
# ===============================================
set -g default-terminal "xterm-256color"
set -g terminal-overrides ',xterm-256color:RGB'
set -g history-limit 10000
# Start window numbers at 1 to match keyboard order
set -g base-index 1
set -g pane-base-index 1
setw -g base-index 1
setw -g pane-base-index 1
# Vi mode
setw -g mode-keys vi
# Renumber windows sequentially after closing any of them
set -g renumber-windows on
# Enable mouse scolling
set -g mouse on
# Sane mouse scrolling
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Health check
set -sg escape-time 10
set-option -g focus-events on
# ===============================================
# Keybinds
# ===============================================
unbind C-b
set -g prefix C-y
bind C-y send-prefix
# Easier reload
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Easier pane split
unbind-key s
bind 's' split-window -c "#{pane_current_path}"
unbind-key v
bind 'v' split-window -hc "#{pane_current_path}"
# Scripts
# source: https://www.youtube.com/watch?v=hJzqEAf2U4I
bind -r i run "tmux neww tmux-cht.sh"
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n 'C-\' run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
# ===============================================
# Appearance
# ===============================================
# inspired from: https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
# loud or quiet?
set -g visual-activity off
set -g visual-bell off
set -g visual-silence off
setw -g monitor-activity off
set -g bell-action none
# modes
setw -g mode-style 'fg=#000000 bg=#56B6C2 bold'
# panes
set -g pane-border-style 'fg=#B8B4B4'
set -g pane-active-border-style 'fg=#56B6C2'
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=#282C34'
set -g status-left ''
set -g status-right '#[fg=colour255,bg=#363636] %a, %d %b #[fg=#000000 bg=#61AFEF bold] %H:%M '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style 'fg=#000000'
setw -g window-status-current-format '#[bg=#E06C75] #I #[bg=#61AFEF] #W '
setw -g window-status-style 'fg=colour255'
setw -g window-status-format '#[bg=#6F8284] #I #[bg=#363636] #W '
# messages
set -g message-style 'fg=#56B6C2 bg=#282C34 bold'