-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
90 lines (71 loc) · 3.39 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
set -g default-terminal "screen-256color"
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -s set-clipboard off
set -s escape-time 0
set -g status-keys vi
setw -g mode-keys vi
set -g mode-mouse on
setw -g mouse-resize-pane on
setw -g mouse-select-pane on
setw -g mouse-select-window on
setw -g mouse-utf8 off
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
bind s split-window -v
bind v split-window -h
# move around panes with hjkl, as one would in vim after pressing ctrl-w
# bind h select-pane -L
# bind j select-pane -D
# bind k select-pane -U
# bind l select-pane -R
# Smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
# resize panes with HJKL
# feel free to change the "1" to however many lines you want to resize by, only
# one at a time can be slow
bind -r H resize-pane -L 1
bind -r J resize-pane -D 1
bind -r K resize-pane -U 1
bind -r L resize-pane -R 1
bind Space last-window
bind C-h previous-window
bind C-l next-window
bind Escape copy-mode
bind p paste-buffer
bind C new-window -a
bind b split-window -dv -p 20 'tail -f /tmp/tmux.out'
bind -t vi-copy Space page-down
bind -t vi-copy BSpace page-up
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy C-v rectangle-toggle
#set -g update-environment 'DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY DBUS_SESSION_BUS_ADDRESS'
set -ga update-environment ' DBUS_SESSION_BUS_ADDRESS'
set -g status-left-length 52
set -g status-right-length 451
set -g status-fg white
set -g status-bg colour234
set -g window-status-activity-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg colour39
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold
set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]'
set -g status-right "#[fg=colour238,bg=colour234,nobold]#[fg=colour252,bg=colour238,nobold] #P \"#22T\" #[fg=colour235,bg=colour252,nobold] %I:%M %p %d-%b-%y"
set -g window-status-format "#[fg=white,bg=colour234]#I #W"
set -g window-status-current-format "#[fg=colour39,bg=colour234]#[fg=colour25,bg=colour39,noreverse,bold]#I #W#[fg=colour39,bg=colour234]"
#set -g window-status-current-format "#[fg=colour234,bg=colour39]#[fg=colour25,bg=colour39,noreverse,bold] #I #W #[fg=colour39,bg=colour234,nobold]"
# Reload the config file
bind R source-file ~/.tmux.conf \; display-message 'Config reloaded'
# Window zooming
bind z run ". ~/.tmux/zoom"