blob: 6183fda501b3056862264571f406d4dcefa51017 (
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
|
# quickly apply config changes: <prefix>r
unbind r
bind r source-file ~/.config/tmux/tmux.conf
# restore legacy colors
set -s theme terminal
set -g mouse on
# start tabs with 1; default is 0
set -g base-index 1
# allows to show images in terminal
set -g allow-passthrough on
# allows to use vim bindings in scroll mode - key [
set-window-option -g mode-keys vi
# reassign leader key to C-f
set -g prefix C-f
unbind-key C-b
bind-key C-f send-prefix
# switch between panes using vim binds
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# needed for autoread to work in neovim
set-option -g focus-events on
# no space between tabs
WHITE_BLOCK='#[fg=brightwhite]█#[default]'
set-window-option -g window-status-separator $WHITE_BLOCK
# paints the tab yellow when in select/scroll mode
set-window-option -g window-status-format "#{?pane_in_mode,#[bg=brightyellow],} #I:#W#{?#{m:*Z*,#{window_flags}},[Z]} #[default]#{?window_end_flag,$WHITE_BLOCK,}"
# paints selected tab white (unless in scroll mode)
set-window-option -g window-status-current-format "#[bg=brightwhite]#{?pane_in_mode,#[bg=brightyellow],} #I:#W#{?#{m:*Z*,#{window_flags}},[Z]} #[default]#{?window_end_flag,$WHITE_BLOCK,}"
# open pane splits at the same path as current pane
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# but reset to the initial path when creating a window
# bind "c" new-window -c "#{pane_current_path}"
# default but with no space on the right
set-window-option -g status-left "[#S] $WHITE_BLOCK"
# time and battery status
set-window-option -g status-right '#[bg=brightwhite] %H:%M #[default]#($HOME/.config/tmux/battery.sh)'
# update each second
set-window-option -g status-interval 1
# increase scrollback size to 50K lines
set-option -g history-limit 50000
# enables OSC52 clipboard - this allows copying to/from remote nvim instance
# works together with `vim.g.clipboard = "osc52"` in init.lua on remote
set -s set-clipboard on
|