summaryrefslogtreecommitdiffstats
path: root/.config/tmux/tmux.conf
blob: 99c01f34dfe5dc75d02236c99b4585fd0f6e0159 (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
# tmux configuration file

# See `man 1 tmux`
# Ran when the tmux's server starts (not the client)
# To reload: `source-file ~/.config/tmux/tmux.conf`

set-option -g default-shell /usr/bin/bash
set-option -g mode-keys vi
set-option -g status-keys vi
# All mouse keys will be captured, use Shift+click to pass through
set-option -g mouse on

set-option -g status-left-length 27
set-option -g status-left                       " #{p22:#{=/21/…:session_name}} ║"
set-option -g status-left-style "reverse,bold"
set-option -g status-right-length 71
set-option -g status-right                      "#{p-30:\"#{=/27/…:pane_title}\"} |  %H:%M | 󰃭 %Y-%m-%d |  #(t=$(($(date +%%s)-#{session_created})); printf '%%dd %%02d:%%02d' $((t / 86400)) $((t %% 86400 / 3600)) $((t %% 3600 / 60))) "
set-option -g window-status-format              " #{?#F,#F,}#{p19:#{=/18/…:window_name}} "
set-option -g window-status-current-format      " #{?#F,#F,}#{p19:#{=/18/…:window_name}} "
set-option -g window-status-separator "║"
set-option -g window-status-current-style "bold,italics"

set-option -g focus-events on

unbind C-b
set-option -g prefix C-Space
bind-key C-space send-prefix

bind-key -T root M-: command-prompt
bind-key -T root M-M choose-tree
bind-key -T root M-{ copy-mode

bind-key -T root M-Q kill-session
bind-key -T root M-C detach-client

bind-key -T root M-T new-window
bind-key -T root M-N next-window
bind-key -T root M-B previous-window
bind-key -T root M-P last-window
bind-key -T prefix < swap-window -d -t -1
bind-key -T prefix > swap-window -d -t +1
bind-key -T prefix r command-prompt -I "#W" { rename-window "%%" }
bind-key -T prefix R command-prompt -I "#S" { rename-session "%%" }

bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi V send-keys -X select-line
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel

bind-key -T root M-H select-pane -L
bind-key -T root M-J select-pane -D
bind-key -T root M-K select-pane -U
bind-key -T root M-L select-pane -R
bind-key -T root M-S split-window
bind-key -T root M-V split-window -h