-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
124 lines (92 loc) Β· 3.36 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
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
# General
set -gq utf8 on
set -gq status-utf8 on
set -g default-terminal "screen-256color"
set -g history-limit 100000
## Use system copy/paste in mouse mode
set -g mouse on
### tmux 2.6 doesn't need the 'reattach-to-user-namespace' gymnastics
### https://gist.github.com/brendanhay/1769870#gistcomment-588284
setw -g mode-keys vi
bind-key -T edit-mode-vi Up send-keys -X history-up
bind-key -T edit-mode-vi Down send-keys -X history-down
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi [ send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi ] send-keys -X copy-selection
## Start window/pane index at 1 for easier typing
set -g base-index 1
setw -g pane-base-index 1
## Re-number windows when one is closed
set -g renumber-windows on
bind R move-window -r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
## Clear screen
bind -n C-k send-keys -R \; send-keys C-l \; clear-history
# set prefix to an easier to type combination
set -g prefix C-b
bind C-b send-prefix
set -g prefix2 `
bind ` send-prefix -2
# Pane
## Open new panes using the currrent working path
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
## Add more logical split key
bind | split-window -h -c "#{pane_current_path}"
bind '\' split-window -v -c "#{pane_current_path}"
## Allow toggling mouse mode
bind M \
set -g mouse #{?mouse,off,on};
## Incremental resizing
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# Pane styles
set -g pane-border-style bg=default,fg=default
set -g pane-active-border-style bg=default,fg=green
# Pane number indicator
set -g display-panes-colour default
set -g display-panes-active-colour default
## Movement
bind > swap-window -t +1
bind < swap-window -t -1
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind a last-window
# Status Bar
set -g status-interval 1
set -g status-bg black
set -g status-fg brightblack
## Left side of status bar
set -g status-left-style bg=default,fg=default
set -g status-left-length 40
set -g status-left "[#h] #[fg=green]#S #[fg=white]Β» #[fg=yellow]#I #[fg=cyan]#P "
## Windowing status
setw -g window-status-format " #I:#W#F "
setw -g window-status-current-format " #I:#W#F "
set -g status-justify centre
## Right side of status bar
set -g status-right-style bg=default,fg=default
set -g status-right-length 40
set -g status-right "#[fg=cyan]#{?client_prefix,#[reverse]prefix#[noreverse],}#[fg=red]#{?mouse, #[reverse] mouse #[noreverse],} #[fg=yellow]%H:%M:%S #[fg=green]%a %b %-d"
## Current window status
set -g window-status-current-style bg=magenta,fg=black
## Window with activity status
### NOTE: fg and bg are flipped due to a tmux bug
set -g window-status-activity-style bg=yellow,fg=black
# Misc.
## Clock mode
set -g clock-mode-colour red
set -g clock-mode-style 24
## Message
set -g message-style bg=default,fg=default
## Command message
set -g message-command-style bg=default,fg=default
## Mode
set -g mode-style bg=red,fg=default