-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtmux.conf
executable file
·123 lines (93 loc) · 3.25 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Copyright (C) 2016-present Arctic Ice Studio <[email protected]>
# Copyright (C) 2016-present Sven Greb <[email protected]>
# Project: igloo
# Repository: https://github.com/arcticicestudio/igloo
# License: MIT
# References:
# https://github.com/arcticicestudio/igloo/blob/master/snowblocks/tmux/README.md
#+-----------+
#+ Bootstrap +
#+-----------+
# If "tpm" is not already installed, automatically clone the repository and install all configured plugins.
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
#+---------+
#+ Plugins +
#+---------+
#+--- UI ---+
set -g @plugin "tmux-plugins/tmux-prefix-highlight"
#+--- Color Themes ---+
set -g @plugin "arcticicestudio/nord-tmux"
#+-----------------------+
#+ Plugin Configurations +
#+-----------------------+
#+--- tmux-plugins/tmux-prefix-highlight ---+
set -g @prefix_highlight_show_copy_mode "on"
#+---------+
#+ Options +
#+---------+
# Enable 256 color support
set -g default-terminal "xterm-256color"
# Enable 24-bit "True color" support
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Use vi(m) key bindings in copy mode and in the status line
setw -g mode-keys vi
set -g status-keys vi
# Renumber windows on close
set -g renumber-windows on
# Increase the maximum history length
set -g history-limit 10000
# Enable mouse mode
set -g mouse on
# Automatically set window titles
set-window-option -g automatic-rename on
set-option -g set-titles on
# Use multiple commands without sending the prefix-key within 1 second (default is 500 ms).
set -g repeat-time 1000
# No delay for escape key press
set -sg escape-time 0
#+--------------+
#+ Key Bindings +
#+--------------+
# <Prefix>-<h|v> for window splitting
unbind %
bind h split-window -v
unbind '"'
bind v split-window -h
# <Prefix>-<e> to toggle synchronization
bind e setw synchronize-panes
# <Prefix>-<Ctrl>-<Shift><Arrow> to resize panes
bind -r C-S-Down resize-pane -D
bind -r C-S-Up resize-pane -U
bind -r C-S-Left resize-pane -L
bind -r C-S-Right resize-pane -R
# <Prefix>-<Ctrl>-<Arrow> to switch panes
bind -r C-Left select-pane -L
bind -r C-Right select-pane -R
bind -r C-Up select-pane -U
bind -r C-Down select-pane -D
# <Prefix>-<Shift>-<Arrow> to switch windows
bind -r S-Left previous-window
bind -r S-Right next-window
# Inherit current working directory for new windows/pane
bind c new-window -c "#{pane_current_path}"
# <Prefix>-<Escape> to enter copy-mode with vi(m) key bindings.
# In copy-mode use <v> to start visual selection and <Enter> to copy the selection.
bind Escape copy-mode
bind -T copy-mode-vi 'v' send-keys -X begin-selection
bind -T copy-mode-vi 'y' send-keys -X copy-selection
bind -T copy-mode-vi 'Space' send-keys -X halfpage-down
bind -T copy-mode-vi 'Bspace' send-keys -X halfpage-up
# Use <Prefix>-<p> to paste the copied content.
unbind p
bind p paste-buffer
# <Prefix>-r to reload the configuration file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded configuration!"
#+------------+
#+ Preloading +
#+------------+
# Import the local configuration file if it exists
if "test -f ~/.tmux.conf.local" "source '~/.tmux.conf.user'"
# Initialize and run tpm
run "~/.tmux/plugins/tpm/tpm"