-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
71 lines (61 loc) · 2.56 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
#Change default prefix to Ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
#Powerline status bar
source "/usr/lib/python3.7/site-packages/powerline/bindings/tmux/powerline.conf"
# Prefer vi style key table
setw -g mode-keys vi
#To limit the scrollback buffer to 100000 lines:
set -g history-limit 100000
#To use your mouse in this mode copy mode
#As of tmux 1.5 this option makes using the scroll wheel automatically switch to copy mode and scroll back the tmux scrollback buffer. It is not necessary to first hit Ctrl-B + [ any more. Scrolling back down to the prompt also ends copy mode automatically.
setw -g mouse on
yank="~/.tmux/yank.sh"
# Copy selection on drag end event, but do not cancel copy mode and do not clear selection
# clear select on subsequence mouse click
bind -T copy-mode-vi MouseDragEnd1Pane \
send-keys -X copy-pipe "$yank"
bind -T copy-mode-vi MouseDown1Pane select-pane \;\
send-keys -X clear-selection
#https://gist.github.com/simonjbeaumont/4672606#gistcomment-2570129
#Should be able to drop the long update-environment chain below for following:
#Still not sure if this is really needed? Issues I was having with ?XDG_SESSION_TYPE? not being set in tmux sessions seems to have gone away
#Update bash to latest tmux environment on reattaching
#showenv has a `-s` option now to format the output as bourne shell commands, so I think `eval $(tmux showenv -s ...)` should do the job of this script now.
#https://superuser.com/questions/610313/x11-forwarding-doesnt-work-with-multiple-tmux-sessions
#By default, some of the environment is set when starting the tmux server (when starting the first session), not just any new session.
#make tmux remember the variables that you want to keep from the outside environment. I used ones that differed between locally using Gnome Terminal and remotely using Terminal.app. Some of them probably aren't necessary, but I'm not sure which. The -g flag might not be correct.
#set -g update-environment "\
# CLUTTER_IM_MODULE \
# DBUS_SESSION_BUS_ADDRESS \
# DBUS_SESSION_BUS_ADDRESS \
# DEFAULTS_PATH \
# DESKTOP_AUTOSTART_ID \
# DESKTOP_SESSION \
# DISPLAY \
# GDMSESSION \
# GNOME_DESKTOP_SESSION_ID \
# GPG_AGENT_INFO \
# GTK_IM_MODULE \
# GTK_MODULES \
# SESSION_MANAGER \
# SSH_AGENT_PID \
# SSH_ASKPASS \
# SSH_AUTH_SOCK \
# SSH_CONNECTION \
# WINDOWID \
# WINDOWPATH \
# XAUTHORITY \
# XDG_CONFIG_DIRS \
# XDG_CURRENT_DESKTOP \
# XDG_DATA_DIRS \
# XDG_MENU_PREFIX \
# XDG_RUNTIME_DIR \
# XDG_SEAT \
# XDG_SESSION_DESKTOP \
# XDG_SESSION_ID \
# XDG_SESSION_TYPE \
# XDG_VTNR \
# XMODIFIERS \
# "