-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
130 lines (103 loc) · 3.76 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
124
125
126
127
128
129
130
#source-file ~/.tmux/reset.conf
# start window numbering at 1 for easier switching
# light sets tmux to light mode.
set -g base-index 1
set -g pane-base-index 1
set -g window-style 'bg=#ffffff'
# always number windows consecutively
set -g renumber-windows on
set -g pane-active-border-style 'bg=black,fg=white'
# bind r to reloading the config file
bind r {
source-file ~/.tmux.conf
display "Reloaded tmux config file."
}
# lower command delay
set -sg escape-time 0
# allow any client to resize the pane
setw -g aggressive-resize on
# mouse
setw -g mouse on
# disable context menu
#unbind -n MouseDown3Pane
# Allow dragging to reorder windows.
bind-key -n MouseDrag1Status swap-window -d -t=
# enable 256 colour mode
set -g default-terminal "screen-256color"
#set-option -sa terminal-features ',xterm-256color:RBG'
set-option -sa terminal-overrides ',xterm-256color:RBG'
# increase scrollback buffer size
set -g history-limit 50000
# display messages for 2 seconds
set -g display-time 2000
# focus events enabled for terminals that support them
#set -g focus-events on
# highlight currently active window in status bar
set -g status-style fg=brightwhite,bold,bg=green
setw -g window-status-current-style fg=#ffffff
#set -g status-right '#[fg=green][#[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default] #($HOME/bin/battery)#[fg=green]]'
#set -g status-right '#(~/bin/battery -f "%%b") %Y-%m-%d% %H:%M '
set -g status-right '%Y-%m-%d% %H:%M '
# new panes + windows in same wd
bind c new-window -a -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
## use vim style keys
setw -g mode-keys vi
# vim / xmonad style bindings for pane movement
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# shift-movement keys will resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# shift+ left or right arrows to move the current window left or right.
bind -r S-Left swap-window -t -1
bind -r S-Right swap-window -t +1
# Copy using mouse
bind -T copy-mode-vi MouseDragEnd1Pane {
send -X copy-pipe-and-cancel "~/.tmux/cross-platform/copy"
}
bind -T root DoubleClick1Pane {
copy-mode -M
send -X select-word
send -X copy-pipe-and-cancel "~/.tmux/cross-platform/copy"
}
# Load the light or dark color palette.
#source "$PALETTE_STATE_TMUX"
## copy/paste using vim-style keys
#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
# this is required for terminal-notifier to work properly, amongst other things
#set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL"
#set-option -g default-command "reattach-to-user-namespace -l bash"
if-shell 'test "$(uname)" = "Darwin"' 'source ~/.tmux-osx.conf'
## Plugins
## ================================
##
## Remember to install tpm first:
##
## git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
##
## Plugin manager tpm
set -g @plugin 'tmux-plugins/tpm'
#
# Sensible config defaults (conflicts with current config)
#set -g @plugin 'tmux-plugins/tmux-sensible'
# Saving and resurrection of tmux sessions
#set -g @plugin 'tmux-plugins/tmux-resurrect'
#set -g @resurrect-strategy-nvim 'session'
#set -g @resurrect-capture-pane-contents 'on'
# Automatic invocation of tmux-resurrect
#set -g @plugin 'tmux-plugins/tmux-continuum'
#set -g @continuum-restore 'off'
#set -g @continuum-boot 'off'
# Ensure tpm installed
if-shell '! test -d ~/.tmux/plugins/tpm' 'run-shell "git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm"'
# Insert nothing below the next line
# ================================
run '~/.tmux/plugins/tpm/tpm'