/
tmux.conf
73 lines (72 loc) · 2.67 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
### ### ### ### ### ### ### tmux configuration
set -g default-terminal xterm-256color
set -g default-command "${SHELL}"
set -g history-file ~/.tmux_history
set -g history-limit 1000
set -g destroy-unattached off
set -g mouse on
set -g escape-time 0
set -g base-index 1
set -g display-time 3000
set -g focus-events on
set -g renumber-windows on
set -g monitor-silence 0
set -g set-titles on
set -g set-titles-string "#S: #T (#I/#{session_windows})"
set -g status on
set -g status-keys vi
set -g status-interval 1
set -g status-justify left
set -g status-left-length 15
set -g status-right-length 90
set -wg mode-keys vi
set -wg xterm-keys on
set -wg monitor-bell on
set -wg alternate-screen on
set -wg word-separators ' ()<>[]{}|=,;:&?*@^"'
# Colors
set -g status-style "bg=#5f00d7"
set -g message-style "bg=#000000,fg=#ffffff,bold"
set -g pane-border-style 'fg=#ffffff'
set -g pane-active-border-style 'fg=#5f00d7'
set -g status-left ' #[fg=#ffffff,bold]#S:'
set -g window-status-format ' #[fg=#000000,bold]#I#[fg=#ffff00,bold]#F #[fg=#ffffff,bold]/#{b:pane_current_path}:#{window_name}'
set -g window-status-current-format ' #[fg=#ffff00,bold]#I#[fg=#000000,bold]#F #[fg=#ffff00,bold]/#{b:pane_current_path}:#{window_name}'
set -g status-right "#[fg=#ffffff,bold] %d.%m #[fg=#000000,bold]%a #[fg=#ffffff,bold]%H:%M:%S #[default]"
# ctrl+space - prefix
set -g prefix C-space
unbind C-b
# prefix+r - reload configuration
bind r source /etc/tmux.conf \; display " READ /etc/tmux.conf"
# prefix+{?,/} - search up/down
bind ? copy-mode\; send-key ?
bind / copy-mode\; send-key /
# prefix+v/h - split pane vertically/horizontally using current pane path
bind v split-window -h -c "#{pane_current_path}"
bind h split-window -v -c "#{pane_current_path}"
# prefix+N to create new session
bind N new-session
# prefix+d to close current tab
bind d kill-window
# prefix+k/K - kill current/all except current session
bind k kill-session
bind K kill-session -a
# prefix+m to turn on/off mouse
bind m set-option -g mouse\; display ' MOUSE #{?mouse,ENABLED,DISABLED}'
# alt+shift+up/down to create new/close tab
bind -n M-S-up new-window
bind -n M-S-down kill-window
# alt+shift+left/right - prev/next tab
bind -n M-S-left prev
bind -n M-S-right next
# ctrl+shift+left/right - move tab
bind -n C-S-left swap-window -d -t -1
bind -n C-S-right swap-window -d -t +1
# ctrl+alt+n/s to create/select session
bind -n C-M-n new-session
bind -n C-M-s choose-session
# ctrl+alt+a to toggle status line
bind -n C-M-a set -g status
# when split panes, scroll with mouse wheel other pane without changing pane focus (good for copy/paste)
bind -T copy-mode-vi WheelUpPane send-keys -X -N 3 scroll-up
bind -T copy-mode-vi WheelDownPane send-keys -X -N 3 scroll-down