-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
96 lines (73 loc) · 2.47 KB
/
tmux.conf
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
# Improve colors
set -g default-terminal "tmux-256color"
set-option -sa terminal-overrides ",xterm*:Tc"
set-option -g status-position bottom
# https://github.com/folke/zen-mode.nvim?tab=readme-ov-file#wezterm
set-option -g allow-passthrough on
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g renumber-windows on
# Remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Split panes using (s)plit and (v)ertical in (c)urrent path
unbind '"'
unbind %
bind v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
# Reload config file
unbind r
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
# Vim-like key bindings for pane navigation (default uses cursor keys).
unbind h
bind h select-pane -L
unbind j
bind j select-pane -D
unbind k
bind k select-pane -U
unbind l # normally used for last-window
bind l select-pane -R
# Resize panes
bind-key -r '+' resize-pane -U 5
bind-key -r '_' resize-pane -D 5
bind-key -r '<' resize-pane -L 5
bind-key -r '>' resize-pane -R 5
# (M)aximize split
unbind z
unbind m
bind m resize-pane -Z
# Tmux sessionizer
bind-key -r F run-shell "tmux neww ~/.local/bin/tmux-sessionizer"
# Enable vim mode key
setw -g mode-key vi
bind -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-selection-and-cancel
unbind -T copy-mode-vi MouseDragEnd1Pane
bind P paste-buffer
# Enable mouse
set -g mouse on
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
# Theme
set -g @plugin "janoamaral/tokyo-night-tmux"
set -g @tokyo-night-tmux_window_id_style sub
set -g @tokyo-night-tmux_pane_id_style fsquare
set -g @tokyo-night-tmux_zoom_id_style dsquare
set -g @tokyo-night-tmux_show_datetime 1
set -g @tokyo-night-tmux_date_format DMY
set -g @tokyo-night-tmux_time_format 24H
set -g @tokyo-night-tmux_show_music 0
set -g @tokyo-night-tmux_show_git 1
set -g @tokyo-night-tmux_show_netspeed 0
set -g @tokyo-night-tmux_netspeed_iface "en0" # find your interface with ipconfig
set -g @tokyo-night-tmux_show_path 0
set -g @tokyo-night-tmux_path_format relative # 'relative' or 'full'
set -g @tokyo-night-tmux_show_battery_widget 1
set -g @tokyo-night-tmux_battery_name "InternalBattery-0" # some linux distro have 'BAT0/1'
set -g @tokyo-night-tmux_battery_low_threshold 25
run '~/.tmux/plugins/tpm/tpm'
# Local config
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'