-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
100 lines (80 loc) · 2.52 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
# ==========================
# === General settings ===
# ==========================
# set -g default-terminal "screen-256color"
set -g default-terminal "alacritty"
set -ga terminal-overrides ",alacritty:RGB"
set -g default-shell $SHELL
set -g history-limit 20000
set -g buffer-limit 20
set -sg escape-time 0
set -g display-time 1500
set -g remain-on-exit off
set -g repeat-time 300
setw -g allow-rename on
setw -g automatic-rename on
setw -g automatic-rename-format "#{pane_current_command}"
setw -g aggressive-resize on
# unbind default prefix and set it to Ctrl+a
unbind C-b
unbind C-q
set -g prefix C-q
bind C-q send-prefix
# tile all windows
unbind =
bind = select-layout tiled
# Set parent terminal title to reflect current window in tmux session
set -g set-titles on
set -g set-titles-string "#I:#W"
# make window/pane index start with 1
set -g base-index 1
setw -g pane-base-index 1
# Auto re-number windows
set -g renumber-windows on
setw -g mode-keys vi
# Move tmux status line on top
set-option -g status-position top
set-option -g repeat-time 0
set -g mouse on
######################
#### Key Bindings ####
######################
# reload config file
bind r source-file ~/.tmux.conf
# split window and fix path for tmux 2.9
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Prompt to rename window right after it's created
# set-hook -g after-new-window 'command-prompt -I "#{window_name}" "rename-window '%%'"'
# pane movement shortcuts
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
bind N new-session
# clear screen
bind C-l send-keys C-l \; send-keys -R \; clear-history
# ================================================
# === Copy mode, scroll and clipboard ===
# ================================================
# Prefer vi style key table
setw -g mode-keys vi
set set-clipboard on
bind -T copy-mode-vi v send -X begin-selection
# bind -T copy-mode-vi y send -X copy-selection
bind p paste-buffer
bind C-p choose-buffer
bind -T copy-mode-vi L send -X end-of-line
bind -T copy-mode-vi H send -X start-of-line
# ==========================
# === Plugins ===
# ==========================
set -g @plugin 'fcsonline/tmux-thumbs'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @yank_action 'copy-pipe'
source-file "~/.tmux/theme.tmux"
run '~/.tmux/plugins/tpm/tpm'