-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
105 lines (81 loc) · 2.98 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
96
97
98
99
100
101
102
103
104
105
# Tmux Configuration File by Fitahiana Nomeniavo Joe
# Email: [email protected]
# GitHub: https://github.com/j03-dev
# Change prefix key to '²'
set -g prefix ²
# Enable and disable mouse
bind m set -g mouse on
bind M set -g mouse off
# Reload Tmux config
bind R source ~/.tmux.conf
# Use true color
set -g default-terminal "screen-256color"
set -s default-terminal 'tmux-256color'
set -ga terminal-overrides ",xterm-256color*:Tc"
set -as terminal-features ",xterm-256color:RGB"
set-option -g focus-events on
# Basic Vim movement key bindings in copy mode
bind-key -T copy-mode h send-keys -X cursor-left
bind-key -T copy-mode l send-keys -X cursor-right
bind-key -T copy-mode k send-keys -X cursor-up
bind-key -T copy-mode j send-keys -X cursor-down
# Kill panes and sessions
unbind-key x
bind-key x kill-pane
bind-key X kill-session
# Selection in copy mode
bind-key -T copy-mode v select-pane \; send-keys -X begin-selection
# Search in copy mode
bind-key -T copy-mode / command-prompt -p "(search down)" "send -X search-forward \"%%%\""
# Pane navigation in normal mode
bind-key -r -T prefix h select-pane -R
bind-key -r -T prefix j select-pane -D
bind-key -r -T prefix k select-pane -U
bind-key -r -T prefix l select-pane -L
# Splitting panes
bind-key | split-window -h -c "#{pane_current_path}"
bind-key _ split-window -v -c "#{pane_current_path}"
# Window movements
bind-key L last-window
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
# Word separators for automatic word selection
set-window-option -g word-separators ' @"=()[]'
# Escape time setting
set-option -s escape-time 0
# Command prompt movements in copy mode
set-option -g status-keys vi
# Resizing panes Vim-style
bind-key -r H resize-pane -L 2
bind-key -r J resize-pane -D 2
bind-key -r K resize-pane -U 2
bind-key -r L resize-pane -R 2
# Vim-style in copy mode
set-window-option -g mode-keys vi
# Interacting with Paste Buffer
bind-key Escape copy-mode
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel
bind-key C-b choose-buffer
unbind-key p
bind-key p paste-buffer
# Move window
bind -n M-h previous-window
bind -n M-l next-window
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin "janoamaral/tokyo-night-tmux"
set -g @tokyo-night-tmux_show_netspeed 1
set -g @tokyo-night-tmux_netspeed_iface "wlp1s0": # find your interface with ip link
set -g @tokyo-night-tmux_show_music 1
set -g @tokyo-night-tmux_show_path 1
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 "BAT1" # some linux distro have 'BAT0'
set -g @tokyo-night-tmux_battery_low_threshold 21 # default
# set -g @plugin 'dracula/tmux'
# set -g @dracula-plugins "battery time"
# set -g @dracula-show-powerline true
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'