-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
143 lines (104 loc) · 3.88 KB
/
tmux.conf
File metadata and controls
143 lines (104 loc) · 3.88 KB
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
131
132
133
134
135
136
137
138
139
140
141
142
# $Id: t-williams.conf,v 1.1 2009/11/02 18:59:28 nicm Exp $
#
# ~/.tmux.conf - tmux terminal multiplexer config
# Thayer Williams (http://cinderwick.ca)
# "Feel free to do whatever you like with it."
# Mouse mode
set -g mouse on
# set prefix key to ctrl + a
unbind C-b
set -g prefix C-a
## split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# switch panes using Alt + arrow keys without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# send the prefix to client inside window (ala nested sessions)
bind-key a send-prefix
# toggle last window like screen
bind-key C-a last-window
# confirm before killing a window or the server
bind-key k confirm kill-window
bind-key K confirm kill-server
# toggle statusbar
set -g status on
bind-key b set-option status
# ctrl+left/right cycles thru windows
bind-key -n C-right next
bind-key -n C-left prev
# open a man page in new window
bind / command-prompt "split-window 'exec man %%'"
# quick view of processes
bind '~' split-window "exec htop"
# scrollback buffer n lines
set -g history-limit 5000
# listen for activity on all windows
set -g bell-action any
# on-screen time for display-panes in ms
set -g display-panes-time 2000
# start window indexing at one instead of zero
set -g base-index 1
# enable wm window titles
set -g set-titles on
# wm window title string (uses statusbar variables)
set -g set-titles-string "tmux.#I.#W"
# ThG: set vi mode
set-window-option -g mode-keys vi
set -g @shell_mode 'vi'
# ThG: force a reload of the .tmux.conf file with Ctrl-a r
unbind r
bind r source-file ~/.tmux.conf
## Shift + (arrow) to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Status bar 2 non-tab-based cyan color
set -g display-time 3000
set -g set-clipboard on
# The panes
set -g pane-border-style bg=colour235,fg=colour238
set -g pane-active-border-style bg=colour236,fg=colour51
# default statusbar colors
set -g status-justify left # center align the window list
set -g status-interval 2
set -g update-environment "R_LIBS_USER"
## The statusbar
set -g status-position bottom
set -g status-style dim,bg=colour234,fg=colour137
set -g status-left ''
if '[ -z "$DISPLAY" ]' 'set -g status-left "[#[fg=green] #H #[default]]"'
set -g status-right '#[fg=colour233,bg=colour241,bold]%A, %B %d #[fg=colour233,bg=colour245,bold] %I:%M %p '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style bold,fg=colour81,bg=colour238
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-style none,fg=colour135,bg=colour235
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style bold,fg=colour225,bg=colour1
# command/message line colors
set -g message-style bold,fg=colour232,bg=colour166
# Maximizing and restoring panes.
unbind +
bind + new-window -d -n tmp \; swap-pane -s tmp.0 \; select-window -t tmp
unbind -
bind - last-window \; swap-pane -s tmp.0 \; kill-window -t tmp
# for tmux --version < 2.4
# bind -T copy-mode-vi y copy-pipe 'xclip -in -sel clip'
# tmux-resurrect restore tmux session
run-shell ~/src/tmux-resurrect/resurrect.tmux
# download repository from github: tmux-plugins/tmux-yank
# run-shell ~/src/tmux-yank/yank.tmux
# bind P paste-buffer
# bind-key -T copy-mode-vi 'v' send -X begin-selection
# bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -in -sel clipboard'
# bind-key -T copy-mode-vi 'r' rectangle-toggle
# for tmux --version = 2.4
bind P paste-buffer
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe 'xclip -in -selection clipboard'
# Set port of SSH remote tunnel, where tmux will pipe buffers to transfer on local machine for copy
# set -g @copy_backend_remote_tunnel_port 11988