-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
98 lines (71 loc) · 3.12 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
setw -g mode-keys vi
set -g mouse on
set -g pane-border-status top
set-option -g repeat-time 200
# Start windows and panes index at 1, not 0.
set -g base-index 1
setw -g pane-base-index 1
# Ensure window index numbers get reordered on delete.
set-option -g renumber-windows on
# don't rename windows automatically
set-option -g allow-rename off
setw -g automatic-rename off
set-window-option -g automatic-rename off
set -g pane-border-style 'fg=#ff5f00,bg=black'
set -g pane-active-border-style 'fg=black,bg=#ff5f00'
set -g pane-border-status top
set -g pane-border-format " #{pane_index} #{pane_title} "
set-option -s set-clipboard on
set -g @prefix_highlight_fg 'black'
set -g @prefix_highlight_bg '#ff5f00'
set -g status-interval 10
set -g status on
set -g status-left '#[fg=#ff5f00,bg=#444444] #(bash -c "printf \"\Uf011b\"") #[fg=white]#{=7:session_name} '
set -g status-left-length 17
set -g status-right '#{?pane_synchronized, #[bg=#ff5f00]#[fg=black]Sync Panes,}'
set -ag status-right '#{prefix_highlight} #{window_flags} '
# set -ag status-right '#[fg=#ff5f00]#{continuum_status}#[default] '
set -ag status-right '#[fg=white]#(bash -c "printf \"\Uf02ca\"") #(timeout 1 df -h /root | tail -1 | awk "{ print \$3\"/\"\$2}") '
set -ag status-right '#[fg=white]#(bash -c "printf \"\Uf035b\"") #(timeout 1 free -mh | head -n 2 | tail -n 1 | awk "{ print \$3\"/\"\$2}" ) '
set -ag status-right '#[fg=white]#(timeout 1 cat /proc/loadavg | cut -f1 -d" ") '
set -ag status-right '#[fg=white]#(timeout 1 date +"%d-%m-%Y %H:%M") '
set -g status-right-length 150
set -g message-command-style 'fg=black,bg=#ff5f00'
set -g status-style 'fg=#ff5f00,bg=black'
set -g message-style 'fg=black,bg=#ff5f00'
set -g mode-style 'fg=black,bg=#ff5f00'
# synchronize panes
bind-key C-x set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
# history
set-option -g history-limit 20000
# window status
setw -g window-status-format "#[bg=colour235]#[fg=white] #{window_index} #{window_name} "
setw -g window-status-current-format "#[bg=#ff5f00]#[fg=black] #{window_index} #{window_name} "
# Scrolling for less etc.
# @see https://www.reddit.com/r/tmux/comments/925w9t/how_to_scroll_the_pager_less_in_copy_mode/
tmux_commands_with_legacy_scroll="nano less man bat"
# Sane scrolling
set -g @scroll-in-moused-over-pane "on"
set -g @scroll-down-exit-copy-mode "on"
set -g @scroll-speed-num-lines-per-scroll 3
set -g @emulate-scroll-for-no-mouse-alternate-buffer 'on'
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
bind-key -n C-S-M-Up resize-pane -U 10
bind-key -n C-S-M-Down resize-pane -D 10
bind-key -n C-S-M-Left resize-pane -L 10
bind-key -n C-S-M-Right resize-pane -R 10
unbind C-PageUp
unbind C-PageDown
# https://github.com/tmux/tmux/issues/140#issuecomment-302742783
# 2.4+
unbind -T copy-mode MouseDragEnd1Pane
# 2.5+
unbind -T copy-mode-vi MouseDragEnd1Pane
# home/end
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R