aboutsummaryrefslogtreecommitdiffhomepage
path: root/home-manager/config/tmux/tmux.conf
blob: e1715cd0db3b3d2a8c3bda4bd9b73005b2199486 (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
###################################################################
#  __  __          _                                          __  #
# |  \/  |_   _   | |_ _ __ ___  _   ___  __  ___ ___  _ __  / _| #
# | |\/| | | | |  | __| '_ ` _ \| | | \ \/ / / __/ _ \| '_ \| |_  #
# | |  | | |_| |  | |_| | | | | | |_| |>  < | (_| (_) | | | |  _| #
# |_|  |_|\__, | (_)__|_| |_| |_|\__,_/_/\_(_)___\___/|_| |_|_|   #
#         |___/                                                   #
###################################################################

# OPTIONS {{{1

# BASICS {{{2
set-option -g renumber-windows on
set-option -g focus-events on

# TERMINAL FEATURES {{{2
set-option -ga terminal-overrides ',tmux-256color:Tc'
set-option -ga terminal-overrides ',alacritty:RGB'

# APPEARANCE {{{2
set-option -g status-justify left
set-option -g status-style 'fg=#b1b1c8 bg=#101020'
set-option -g status-left '#{?#{==:#{pane_mode},copy-mode},#[bg=#deab52] COPY ,#[bg=#6e6eff] TMUX }'
set-option -g status-left-length 20
set-option -g status-left-style 'fg=#101020 bold'
set-option -g status-position top
set-option -g status-right ' %F (%a) %R '
set-option -g status-right-length 25
set-option -g status-right-style 'fg=#b1b1c8 bg=#353535'
set-option -g window-status-separator ''
set-option -g window-status-format ' #W '
set-option -g window-status-style 'fg=#8686bf bg=#101020'
set-option -g window-status-current-format ' #W '
set-option -g window-status-current-style 'fg=#b1b1c8 bg=#353535'

set-option -g pane-border-lines single


# KEY BINDINGS {{{1

unbind-key -a -T root
unbind-key -a -T prefix

set-option -g status-keys emacs

bind-key : command-prompt
bind-key ';' command-prompt
bind-key ? list-keys

# Window
bind-key t new-window
bind-key n next-window
bind-key p previous-window
bind-key N move-window -a
bind-key P move-window -b

# Pane
bind-key w switch-client -T tw
bind-key -T tw h split-window -h -b
bind-key -T tw j split-window -v
bind-key -T tw k split-window -v -b
bind-key -T tw l split-window -h
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key g display-panes -d 0

# Layout
bind-key = select-layout tiled
bind-key 4 split-window \; \
           split-window \; \
           split-window \; \
           select-layout tiled

set-option -g mode-keys vi
bind-key V copy-mode
bind-key -T copy-mode-vi V send-keys -X select-line
bind-key -T copy-mode-vi Escape send-keys -X clear-selection
# This is configured by home-manager.
# bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "<clipboard copy command>"

bind-key s set-option synchronize-panes