-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
80 lines (61 loc) · 2.88 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
# zsh is kinda tight
set-option -g default-shell $SHELL
# copy and paster
set-option -g default-command "reattach-to-user-namespace -l zsh"
# fix delay after esc
set -s escape-time 0
# look good
set -g default-terminal "screen-256color"
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
# a mouse
# set -g mouse-utf8 on
set -g mouse on
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -Tcopy-mode-vi Escape send -X cancel
bind-key -Tcopy-mode-vi V send -X rectangle-toggle
# Update default binding of `Enter` to also use copy-pipe
# unbind -T vi-copy Enter
# bind-key -T vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
# Easy split
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# instructs tmux to expect UTF-8 sequences
# setw -g utf8 on
# set -g status-utf8 on
#start from 0
set-option -g base-index 1
setw -g pane-base-index 1
bind T swap-window -t 1
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# ----------------------
# Status Bar
# -----------------------
set-option -g status on # turn the status bar on
# set -g status-utf8 on # set utf-8 for the status bar
set -g status-interval 5 # set update frequencey (default 15 seconds)
set -g status-justify centre # center window list for clarity
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# dont rename my window!!!
set-option -g allow-rename off
# set color for status bar
set-option -g status-bg colour235 #base02
set-option -g status-fg yellow #yellow
set-option -g status-attr dim
# show host name and IP address on left side of status bar
set -g status-left-length 70
set -g status-left ":: #[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}') "
# 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 ::"
set -g status-interval 10