-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_tmux.conf
83 lines (67 loc) · 2.4 KB
/
dot_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
# Make it use C-a, similar to screen..
unbind C-b
unbind l
set -g prefix C-v
bind-key C-v last-window
# Reload key
bind r source-file ~/.tmux.conf
set -g history-limit 4096
# Support mouse tmux <2.1
# set -g mode-mouse on
# set -g mouse-select-pane on
# mouse mode on tmux >2.1
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
# THEME
set -g status-bg black
set -g status-fg white
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#[fg=green](#S) [#(whoami)@#H]#[default] '
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=red]%H:%M#[default] '
set-window-option -g window-status-current-style fg=red
set-window-option -g window-status-style fg=white
set-window-option -g window-status-style bg=default
set-window-option -g window-status-style dim
set-option -g pane-active-border-style fg=blue
# keys
##set-option -g mouse-select-pane on ## dis fucks up clicking things
set-option -g set-titles-string '#H:#S.#I.#P #W #T' # window number,program name,active (or not)
bind b previous-window
bind f next-window
# maximize-restore panes
bind-key z resize-pane -Z
## unbind and put them to better use
unbind p
unbind n
bind-key p select-pane -U
bind-key n select-pane -D
bind-key j select-pane -L
bind-key k select-pane -R
## the last active pane to the current session
bind-key l join-pane -s !
## join pane from session
bind-key a command-prompt -p "join pane from:" "join-pane -s '%%'"
## send pane to existing session
bind-key A command-prompt -p "send-pane to:" "join-pane -t '%%'"
# Send bash command to pane 1
bind-key S command-prompt -p "Send command to pane 1: " "send-keys -t 1 C-z '%%' Enter"
# send window to another session
bind-key u command-prompt -p "send window to another <session>:<number>" "move-window -t '%%'"
## swap panes
bind-key N swap-pane -D
bind-key P swap-pane -U
# detach all other sessions
bind-key O detach-client -a
# set correct term
set -g default-terminal screen-256color
# Tmux resurrect https://github.com/tmux-plugins/tmux-resurrect
run-shell ~/.tmux-resurrect/resurrect.tmux
# Keybinds for tmux-resurrect
# Ctrl-s save
# Ctrl-r restor
# Tmux sidebar https://github.com/tmux-plugins/tmux-sidebar
run-shell ~/.tmux-sidebar/sidebar.tmux
# keybindings for tmux-sidebar
# ctrl + Tab toggle sidebar
# ctrl + backspace toggle sidebar and move cursor to it