-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_tmux.conf
116 lines (89 loc) · 3.5 KB
/
dot_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
# # Set due to error '~/.tmux/plugins/tpm/tpm' returned 127 (on macOS, w/ tmux installed using brew)
# # ref: https://github.com/tmux-plugins/tpm/blob/master/docs/tpm_not_working.md
# set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin"
set-window-option -g mode-keys vi
# setup vi copy mode
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
#
# Use the current path of an existing window
# for the new window
#
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# If terminal doesn't report focus
set -g focus-events on
# tmux messages are displayed for 4 seconds
set -g display-time 4000
# refresh 'status-left' and 'status-right' more often
set -g status-interval 5
# Start window and pane indices at 1.
set -g base-index 1
set -g pane-base-index 0
# Set the title of the terminal from withing tmux
set-option -g set-titles on
# Configurations for terminfo used to set 256 color and proper interpretation
# of terminal input (keyboard). Setup based on gist at:
# https://gist.github.com/bbqtd/a4ac060d6f6b9ea6fe3aabe735aa9d95
#
set-option default-terminal "tmux-256color"
set-option -a terminal-overrides ",*256col*:RGB"
# undercurl support
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
# underscore colours - needs tmux-3.0
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
# Set escape-time in ~/.tmux.conf: https://github.com/neovim/neovim/wiki/FAQ
set -sg escape-time 10
# split panes using | and -
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# break and join panes easily
bind j command-prompt -p "join pane from: " "join-pane -hs '%%'"
bind b "break-pane -dP"
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# don't rename windows automatically
set-option -g allow-rename off
# Clear screen (pane)
bind K send-keys -R \; clear-history
# Increase tmux history
set -g history-limit 50000
######################
# Tmux plugin configuration
######################
set -g @plugin 'tmux-plugins/tpm'
# Commands for tmux-resurrect
# save: prefix + C-s
# restore: prefix + C-r
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @resurrect-strategy-nvim 'session'
# Commands for tmux-logging
# start / stop logging: prefix + shift + p
# save history of current pane: prefix + alt + shift + p
# clear pane hisotry: prefix + alt + c
set -g @plugin 'tmux-plugins/tmux-logging'
# Commands for tmux-yank
set -g @plugin 'tmux-plugins/tmux-yank'
# Dracula theme
set -g @plugin 'dracula/tmux'
set -g @dracula-show-left-icon ⚡️
set -g @dracula-show-powerline true
set -g @dracula-border-contrast true
# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, network, network-bandwidth, network-ping, weather, time
set -g @dracula-plugins "network"
set -g @dracula-show-flags true
set -g @dracula-show-fahrenheit true
set -g @dracula-show-weather false
set -g @dracula-show-battery false
set -g @dracula-show-network false
# Configure TMUX to switch panes with vim keybindings
set -g @plugin 'christoomey/vim-tmux-navigator'
# Commands for tmux plugins
# Install plugins: Add plugin above then press prefix + I
# Update plugins: prefix + U
# Uninstall plugins: Remove plugin from above then press prefix + alt + U
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'