/
tmux.conf
40 lines (31 loc) · 1.58 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
# Reload tmux configuration on R
bind R source-file ~/.tmux.conf \; display-message "Config reloaded.."
# Configure status bar
set -g status-bg black
set -g status-fg white
set-option -g status-justify centre
# Current session on the left
set-option -g status-left '#[bg=black,fg=green][#[fg=cyan]#S#[fg=green]]'
set-option -g status-left-length 20
# Current windows within this session
setw -g automatic-rename on
set-window-option -g window-status-format '#[dim]#I:#[default]#W#[fg=grey,dim]'
set-window-option -g window-status-current-format '#[fg=cyan,bold]#I#[fg=blue]:#[fg=cyan]#W#[fg=dim]'
# Current date and time on the right
# set -g status-right '#[fg=green][#[fg=cyan]%Y-%m-%d#[fg=green]]'
# Use Alt+Arrow to move between windows
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Automatically update terminal title based on tmux session name
set-option -g set-titles on
# Join a foreign window into the current one as a pane / split them back off
# https://unix.stackexchange.com/questions/14300/moving-tmux-window-to-pane
bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
# Required by Mac OSX (and especially vscode)
# https://github.com/Microsoft/vscode/issues/24112#issuecomment-336672556
set -g default-command "reattach-to-user-namespace -l $SHELL"
# https://github.com/atom/atom/issues/3093#issuecomment-59784274
set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL"