-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
101 lines (74 loc) · 2.42 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
set-option -sa terminal-overrides ",xterm*:Tc"
# sets prefix to Ctrl-A
set -g prefix C-a
unbind C-b
# use vim keybindings in copy mode
setw -g mode-keys vi
# enter copy mode with /
# bind-key / copy-mode \; send-key ?
#
# update default binding of `Enter` and `Space to also use copy-pipe
unbind -T copy-mode-vi Enter
unbind -T copy-mode-vi Space
bind-key -T edit-mode-vi Up send-keys -X history-up
bind-key -T edit-mode-vi Down send-keys -X history-down
# setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
# copy text with `y` in copy mode
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# copy text with mouse selection without pressing any key
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel
# faster command sequence
set -s escape-time 0
# sets shell do the default user shell
set -g default-shell /bin/zsh
# 256 colors
set -g default-terminal "screen-256color"
# increase history limit
set-option -g history-limit 5000
# reloads .tmux.conf
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# renumber windows after closing one
set-option -g renumber-windows on
# highlight the current window
setw -g window-status-current-style fg=black,bg=gray
# move around panes with hjkl, as one would in vim after pressing ctrl + w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# set parent terminal title to reflect current window in tmux session
set -g set-titles on
set -g set-titles-string "#S: #W"
# clock mode customization
set -g clock-mode-colour colour1
# status bar customization
set -g status-bg black
set -g status-fg gray
set -g status-left " "
# enable mouse
set -g mouse on
# sane scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# use C-a C-a to roam between panes
unbind C-a
bind C-a select-pane -t :.+
# set C-a h / C-a v to split window
bind h split-window -v
bind v split-window -h
# plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'anghootys/tmux-ip-address'
# status address config
set -g status-right '#{ip_address} | #H | %d/%m %H:%M'
set -g @ip_address_refresh_key 'P'
# run the plugin manager
run '~/.tmux/plugins/tpm/tpm'