blob: 31ac742302b32ea804381bec44f331c3a7a85952 (
plain)
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
|
# change prefix
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
bind s split-window -v
bind v split-window -h
# split panes using | and -
bind - split-window -v
bind | split-window -h
unbind '"'
unbind %
# reload config file
bind r source-file ~/.tmux.conf
# large history
set -g history-limit 10000
# start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# switch term
bind 1 run-shell "tmux_window 1"
bind 2 run-shell "tmux_window 2"
bind 3 run-shell "tmux_window 3"
bind 4 run-shell "tmux_window 4"
bind 5 run-shell "tmux_window 5"
bind 6 run-shell "tmux_window 6"
bind 7 run-shell "tmux_window 7"
bind 8 run-shell "tmux_window 8"
bind 9 run-shell "tmux_window 9"
bind 0 run-shell "tmux_window 10"
bind S choose-tree
# terminal style
set -g default-terminal "tmux-256color"
set -g terminal-overrides "*:colors=256"
set -a terminal-features "xterm-kitty:RGB"
# focus events
set -g focus-events on
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# enable mouse control
set -g mouse on
# don't rename windows automatically
set-option -g allow-rename off
# don't do anything when a 'bell' rings
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
# clock mode
setw -g clock-mode-colour yellow
# copy mode
setw -g mode-style 'fg=black bg=red bold'
setw -g mode-keys vi
# panes
set -g pane-border-style 'fg=red'
set -g pane-active-border-style 'fg=yellow'
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'fg=blue'
set -g status-interval 1
set -g status-left ''
set -g status-left-length 10
set -g status-right-style 'fg=black bg=blue'
set -g status-right '%Y-%m-%d %H:%M:%S '
set -g status-right-length 50
setw -g window-status-current-style 'fg=black bg=blue'
setw -g window-status-current-format ' #I #W #F '
setw -g window-status-style 'fg=blue bg=black'
setw -g window-status-format ' #I #[fg=white]#W #[fg=blue]#F '
setw -g window-status-bell-style 'fg=blue bg=red bold'
# messages
set -g message-style 'fg=yellow bg=red bold'
# bind : to command-prompt like vim
# this is the default in tmux already
bind : command-prompt
|