-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
92 lines (74 loc) · 2.33 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
# UTF8
# set-option -g status-utf8 on
setw -g xterm-keys off
# nnoremap ^[OA <Up>
# nnoremap ^[OB <Down>
# nnoremap ^[OD <Left>
# nnoremap ^[OC <Right>
# Mac OSX pasteboard
# set-option -g default-command "reattach-to-user-namespace -l zsh"
# prefix
unbind-key C-b
unbind C-v
set -g prefix C-a
bind-key C-a send-prefix
# use vi mode
setw -g mode-keys vi
bind - split-window -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
# copy mode
bind C-y copy-mode
unbind [
unbind p
bind p paste-buffer
# bind -t vi-copy v begin-selection
# bind -t vi-copy y copy-selection
# bind -t vi-copy Escape cancel
bind y run "tmux save-buffer - | xclip -selection clipboard &>/dev/null"
bind C-v run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
# refresh with r
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded configuration file!"
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# set -g mode-mouse on
# set -g mouse-select-pane on
# set -g mouse-select-window on
# vim movement
bind C-j select-pane -D
bind C-k select-pane -U
bind C-l select-pane -R
bind C-h select-pane -L
bind j resize-pane -D 10
bind k resize-pane -U 10
bind l resize-pane -R 20
bind h resize-pane -L 20
# sessions
unbind c
bind c new-session
bind x kill-session
# quick controls
bind C-x kill-pane
bind C-c new-window -c "#{pane_current_path}"
bind C-n next-window
bind C-p previous-window
bind C-r rotate-window -D
# bind C-v new-window \; send-keys "vim" \; send-keys "Enter"
# set term
set -g default-terminal "screen-256color"
# set -g window-status-activity-attr bold
# set -g pane-active-border-fg yellow
set -g status-fg colour248
set -g status-bg colour233
# set -g message-fg colour15
# set -g message-bg colour233
# set -g mode-fg colour15
# set -g mode-bg colour33
set -g window-status-format "#[fg=colour248] #I #W "
set -g window-status-current-format "#[fg=colour15,noreverse,bg=colour235] #I #W "
set-option -g status-right "#(cat /tmp/gtd)#[fg=colour15,noreverse,bg=colour233] #(date '+%a %m/%d %I:%M %P') "
bind -n C-k send-keys -R \; clear-history
# Fig Tmux Integration: Enabled
# source-file ~/.fig/tmux
# End of Fig Tmux Integration