-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf.v2.1
99 lines (80 loc) · 2.87 KB
/
tmux.conf.v2.1
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
#""""""""""""""""""""""""""""""""""""""""
#" TMUX OPTIONS
#""""""""""""""""""""""""""""""""""""""""
# set default terminal mode to 256 colors
set -g default-terminal "xterm-256color"
## start with window 1 (instead of 0)
set -g base-index 1
set -g pane-base-index 1
# shorten command delay
set -sg escape-time 1
# don't rename windows automatically
set-option -g allow-rename off
set -g history-limit 99999
# add second tmux prefix key
# set-option -g prefix C-b
set-option -g prefix2 `
#""""""""""""""""""""""""""""""""""""""""
#" TMUX KEYTABLE OPTIONS
#""""""""""""""""""""""""""""""""""""""""
#use `<prefix>q <number>` to select panes
#use `<prefix><number>` to select windows
#use `<prefix>z` to zoom panes
#use `<prefix><Ctrl><Arrows>` to adjust panes
# press <prefix> twice to send
# actual prefix keystroke to application inside tmux
# bind-key C-b send-prefix
bind-key ` send-prefix -2
# for nested tmux session, use this to pass prefix to innser tmux easier
bind-key * set-option -g prefix2 C-b
# split panes using | and -, make sure they open in the same path
bind-key v split-window -h -c "#{pane_current_path}"
bind-key s split-window -v -c "#{pane_current_path}"
bind-key a last-window
# open new windows in the current path
bind-key c new-window -c "#{pane_current_path}"
# reload config file
bind-key r source-file ~/.tmux.conf \; display-message 'Messgae: Tmux Configuration Reloaded'
# toggle mouse
bind-key M setw -g mouse
bind-key y set synchronize-panes \; display-message 'Message: Toggled Panel Input Synchronization'
# pane title rename
bind-key T command-prompt -p "new pane title:" 'select-pane -t "%%"'
bind-key -T prefix h select-pane -L
bind-key -T prefix j select-pane -D
bind-key -T prefix k select-pane -U
bind-key -T prefix l select-pane -R
# Copy Mode
# default: prefix [ enter copy-mode
# default: prefix ] paste tmux buffer
# mode-key refer to scroll buffer (copy mode) navigation key binding
# enable vi mode keys
setw -g mouse on
setw -g mode-keys vi
set-option -s set-clipboard off
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-pipe 'xclip -in -selection clipboard'
bind-key -t vi-copy 'C-v' rectangle-toggle
bind-key -t vi-copy 'V' select-line
######################
### UX/UI CHANGES ###
######################
# be quiet
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-option -g bell-action none
set-window-option -g monitor-activity off
# The modes {
setw -g clock-mode-colour colour135
# }
# status-left windows status-right
set -g status on
set -g status-interval 1
set -g status-justify left
set -g status-keys vi
set -g status-left-length 20
set -g status-position bottom
set -g status-right-length 50
setw -g status-left '#{?client_prefix,[PREFIX] ,}[#S] '
setw -g window-status-current-format '[#{?window_zoomed_flag,Z.,}#{?pane_synchronized,S.,}#I:#[underscore]#W#[nounderscore]]'