aboutsummaryrefslogtreecommitdiff
path: root/tmux/.tmux.conf
blob: 54ba9097f9b826428acdfcff5f8d6e6d5e59ddc9 (plain)
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
# colors
set -g default-terminal "screen-256color"

# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
bind-key C-a last-window

# Start numbering at 1
set -g base-index 1

# start with pane 1
set -g pane-base-index 1

# Allows for faster key repetition
set -s escape-time 0

# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on

# Allows us to use C-a a <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix

# Status Bar
set-option -g status on                # turn the status bar on
set -g status-interval 5               # set update frequencey (default 15 seconds)
set -g status-justify centre           # center window list for clarity
set-option -g status-position top     # position the status bar at top of screen

# visual notification of activity in other windows
setw -g monitor-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-option -g bell-action none
set -g visual-activity on


# Make mouse useful
set -gq mouse on
set -gq mouse-utf8 on
# set -gq mouse on
set -gq mouse-resize-pane on
set -gq mouse-select-window on

# Allow mouse to select which pane to use
set -gq mouse-select-pane on

# Scroll History
# set -g history-limit 4096
# i have 32 gigs of ram haha
set -g history-limit 10000

# unicode
setw -gq utf8 on
set -gq status-utf8 on

# show session name, window & pane number, date and time on right side of
# status bar
set -g status-right-length 60
set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]:: %d %b %Y #[fg=green]:: %R" # :: #(date -u | awk '{print $4}')::"


# show host name and IP address on left side of status bar
set -g status-left-length 70
set -g status-left "#[fg=green]: #h : #[fg=blue]#(curl -4 icanhazip.com) #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print \"en0 \" $2}') #(ifconfig en1 | grep 'inet ' | awk '{print \"en1 \" $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') "


unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
# in copy mode can use visual style copy
# tmux version < 2.3
# bind-key -tq vi-copy 'v' begin-selection
# bind-key -tq vi-copy 'y' copy-selection

# new way for v2.3 >
# bind-key -T edit-mode-vi Up send-keys -X history-up
# bind-key -T edit-mode-vi Down send-keys -X history-down
unbind-key -T copy-mode-vi Space     ;   bind-key -T copy-mode-vi v send-keys -X begin-selection
#unbind-key -T copy-mode-vi Enter     ;   bind-key -T copy-mode-vi y send-keys -X copy-selection
unbind-key -T copy-mode-vi Enter     ;   bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -i --clipboard"
# unbind-key -T copy-mode-vi Enter     ;   bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# unbind-key -T copy-mode-vi C-v       ;   bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
# unbind-key -T copy-mode-vi [         ;   bind-key -T copy-mode-vi [ send-keys -X begin-selection
# unbind-key -T copy-mode-vi ]         ;   bind-key -T copy-mode-vi ] send-keys -X copy-selection

# auto copy tmux buffer to clipboard
# bind-key -t vi-copy 'y' copy-pipe copy-selection 'xclip -in -selection clipboard'

# use vi mode
setw -gq mode-keys vi
set -gq status-keys vi

# splitting
# #pane{pane_current_path} makes directory of current path default in the new
# split or pane
unbind %
bind h split-window -h -c "#{pane_current_path}" # Split panes horizontal
unbind '"'
bind v split-window -v -c "#{pane_current_path}" # Split panes veritcally
unbind c
bind c new-window -c "#{pane_current_path}" # Create new window

# toggle status bar visibility
bind t set status

set -s copy-command 'xsel -s'

# Other examples
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'seebi/tmux-colors-solarized'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @yank_selection_mouse 'clipboard'
set -g @colors-solarized 'dark'

# source ~/.tmuxline.conf
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'