tmux-btw

tmux-btw

https://git.tonybtw.com/tmux-btw.git git://git.tonybtw.com/tmux-btw.git
3,196 bytes raw
1
set -g default-terminal "tmux-256color"
2
set -ga terminal-overrides ",*:RGB"
3
set -g mouse on
4
set -g set-clipboard on
5
6
7
unbind C-b
8
set -g prefix C-a
9
bind-key C-a send-prefix
10
11
# Vim like pane selection
12
bind h select-pane -L
13
bind j select-pane -D
14
bind k select-pane -U
15
bind l select-pane -R
16
17
unbind %
18
bind | split-window -h -c "#{pane_current_path}"
19
20
unbind '"'
21
bind - split-window -v -c "#{pane_current_path}"
22
23
unbind r
24
bind r source-file $HOME/.config/tmux/tmux.conf
25
26
# Change from 0 based to 1 based because keyboard layout
27
set -g base-index 1
28
set -g pane-base-index 1
29
set-window-option -g pane-base-index 1
30
set-option -g renumber-windows on
31
32
# Vim-like copy/paste
33
set-window-option -g mode-keys vi
34
bind-key -T copy-mode-vi v send-keys -X begin-selection
35
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
36
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
37
unbind -T copy-mode-vi MouseDragEnd1Pane
38
39
# Alt+hjkl to switch panes (vim-style)
40
bind -n M-h select-pane -L
41
bind -n M-j select-pane -D
42
bind -n M-k select-pane -U
43
bind -n M-l select-pane -R
44
45
# Alt+number to select window
46
bind -n M-1 select-window -t 1
47
bind -n M-2 select-window -t 2
48
bind -n M-3 select-window -t 3
49
bind -n M-4 select-window -t 4
50
bind -n M-5 select-window -t 5
51
bind -n M-6 select-window -t 6
52
bind -n M-7 select-window -t 7
53
bind -n M-8 select-window -t 8
54
bind -n M-9 select-window -t 9
55
56
# Tokyonight Moon theme colors
57
thm_bg="#222436"
58
thm_fg="#c8d3f5"
59
thm_cyan="#86e1fc"
60
thm_black="#1b1d2b"
61
thm_gray="#3a3f5a"
62
thm_magenta="#c099ff"
63
thm_pink="#ff757f"
64
thm_red="#ff757f"
65
thm_green="#c3e88d"
66
thm_yellow="#ffc777"
67
thm_blue="#82aaff"
68
thm_orange="#ff9e64"
69
thm_black4="#444a73"
70
71
# Status bar
72
set -g status "on"
73
set -g status-bg "${thm_bg}"
74
set -g status-justify "left"
75
set -g status-left-length "100"
76
set -g status-right-length "100"
77
78
# Messages
79
set -g message-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
80
set -g message-command-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
81
82
# Panes
83
set -g pane-border-style "fg=${thm_gray}"
84
set -g pane-active-border-style "fg=${thm_blue}"
85
86
# Windows
87
set -g window-status-activity-style "fg=${thm_fg},bg=${thm_bg},none"
88
set -g window-status-separator ""
89
set -g window-status-style "fg=${thm_fg},bg=${thm_bg},none"
90
91
# Statusline - current window
92
set -g window-status-current-format "#[fg=${thm_blue},bg=${thm_bg}] #I: #[fg=${thm_magenta},bg=${thm_bg}](✓) #[fg=${thm_cyan},bg=${thm_bg}]#(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) #[fg=${thm_magenta},bg=${thm_bg}]"
93
94
# Statusline - other windows
95
set -g window-status-format "#[fg=${thm_blue},bg=${thm_bg}] #I: #[fg=${thm_fg},bg=${thm_bg}]#W"
96
97
# Statusline - right side
98
set -g status-right "#[fg=${thm_blue},bg=${thm_bg},nobold,nounderscore,noitalics]#[fg=${thm_bg},bg=${thm_blue},nobold,nounderscore,noitalics] #[fg=${thm_fg},bg=${thm_gray}] #W #{?client_prefix,#[fg=${thm_magenta}],#[fg=${thm_cyan}]}#[bg=${thm_gray}]#{?client_prefix,#[bg=${thm_magenta}],#[bg=${thm_cyan}]}#[fg=${thm_bg}] #[fg=${thm_fg},bg=${thm_gray}] #S "
99
100
# Statusline - left side (empty)
101
set -g status-left ""
102
103
# Modes
104
set -g clock-mode-colour "${thm_blue}"
105
set -g mode-style "fg=${thm_blue} bg=${thm_black4} bold"