-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdot-tmux.conf
95 lines (75 loc) · 3.18 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
#------------------------------------------------- true color everywhere 💃🏻-
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ',xterm-256color:Tc'
set -g focus-events on
#------------------------------------------------------ rebinds the prefix ---
set -g prefix C-a
bind C-a send-prefix
unbind l
# screen-like
bind n next-layout
bind C-b last-pane
bind Space next-window
bind C-Space next-window
bind C-l last-window
#----------------------------------------------------- tips from tmux book ---
set -sg escape-time 1 # shorten commands delay
set -g repeat-time 1000 # increase repeat time for repeatable cmds
set -g base-index 1 # counting windows from 1
set -g pane-base-index 1 # counting panes from 1
set -g renumber-windows on
set -g history-limit 999999999 # increase history limit
setw -g aggressive-resize off
# Use unprefixed meta keys to split panes
bind -n M-'\' split-window -h -c '#{pane_current_path}'
bind -n M-- split-window -v -c '#{pane_current_path}'
# Use unprefixed Alt-vim keys to switch panes
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Capital versions to resize
bind -n M-H resize-pane -L 5
bind -n M-J resize-pane -D 5
bind -n M-K resize-pane -U 5
bind -n M-L resize-pane -R 5
# Use unprefixed meta keys to mark / join panes
bind -n M-m select-pane -m # mark
bind -n M-M select-pane -m # unmark
bind -n M-< join-pane
# MOUSE & CLIPBOARD
set -g mouse on
set -g set-clipboard on
#----------------------------------------------------------- reload config ---
bind r source-file ~/.tmux.conf \; display "~/.tmux.conf Reloaded!"
bind C-r source-file ~/.tmux.conf \; display "~/.tmux.conf Reloaded!"
#----------------------------------------------------------------- VI mode ---
setw -g mode-keys vi
setw -g status-keys vi
setw -g xterm-keys on
setw -g clock-mode-style 24
# set window notifications
setw -g monitor-activity on
set -g visual-activity on
# Log output to a text file on demand
bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"
# type in multiple windows
bind C-x setw synchronize-panes \; display "Sync #{?pane_synchronized,ON,OFF}"
## Join windows: <prefix> s, <prefix> j
# bind J command-prompt -p "join pane from:" "join-pane -s '%%'"
# bind S command-prompt -p "send pane to:" "join-pane -t '%%'"
bind-key m choose-window -F "#{window_index}: #{window_name}" "join-pane -h -t %%"
bind-key M choose-window -F "#{window_index}: #{window_name}" "join-pane -v -t %%"
if-shell "uname | grep -q Darwin" "set -g default-shell /usr/local/bin/zsh"
#--------------------------------------------------------------------- TPM ---
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
#-----------------------------------------------------------------------------
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
#set -g @themepack 'powerline/double/orange'
#set -g @plugin 'jimeh/tmux-themepack'
set -g @thumbs-key F
set -g @plugin 'fcsonline/tmux-thumbs'
if-shell "test -f ~/.theme.tmux.conf" "source ~/.theme.tmux.conf"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'