-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
81 lines (68 loc) · 3.11 KB
/
tmux.conf
File metadata and controls
81 lines (68 loc) · 3.11 KB
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
# vim-keys.conf {
# $Id: vim-keys.conf,v 1.2 2010/09/18 09:36:15 nicm Exp $
#
# vim-keys.conf, v1.2 2010/09/12
#
# By Daniel Thau. Public domain.
#
# This configuration file binds many vi- and vim-like bindings to the
# appropriate tmux key bindings. Note that for many key bindings there is no
# tmux analogue. This is intended for tmux 1.3, which handles pane selection
# differently from the previous versions
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
bind s split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
# 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
# resize panes like vim
# feel free to change the "1" to however many lines you want to resize by, only
# one at a time can be slow
bind < resize-pane -L 1
bind > resize-pane -R 1
bind - resize-pane -D 1
bind + resize-pane -U 1
# }
# rc/tmux.conf {
## Use vim keybindings in copy mode
set-window-option -g mode-keys vi
set-option -s set-clipboard off
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
# (X11) y in copy mode to copy to system clipboard
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
# (Wayland) y in copy mode to copy to system clipboard
#bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'wl-copy'
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
# enable true color in Vim
set-option -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",*256col*:Tc"
set-option -g status-justify left
set-option -g status-interval 15 # 15 sec refresh
set-option -g display-time 3000
set-option -g status-bg blue
set-option -g status-fg white
set-option -g status-position top # show tab bar on top
set-window-option -g window-status-current-style fg=black,bg=cyan
set-option -g status-left-length 15
set-option -g status-right-length 55
set-option -g status-left "#[fg=green,bright,bg=blue] <#S> #[default]|" # session-name
set-option -g status-right "#[fg=red,bright][#[fg=cyan]#H#[fg=red]]#[default] #[fg=yellow,bright]- %m/%d #[fg=green]%H:%M #[default]#[fg=magenta,bright](#(cat /proc/loadavg | cut -d \" \" -f 1,2,3))#[default]"
# }
#---------------------------------------------------------------------------
# CUSTOM SETTINGS
#---------------------------------------------------------------------------
set-option -sg escape-time 1 # reduce wait time after Esc
# set new pages to open in current directory
bind c new-window -c "#{pane_current_path}"
set-option -g pane-border-style fg="#8f8f8f" # set inactive border to white
# terminal title: tmux #SESSION.#WINDOW:#CURRENT_DIRECTORY(full path)
set-option -g set-titles on
set-option -g set-titles-string "tmux #S.#I:#{s|$HOME|~|;s|||:pane_current_path}"
set-option -g status-interval 1 # refresh status every 1s
# window title: #CURRENT_DIRECTORY(basename)
set-option -g automatic-rename on
set-option -g automatic-rename-format "#{?#{==:#{pane_current_path},$HOME},~,#{b:pane_current_path}}"