-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
71 lines (58 loc) · 2.4 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
# set Zsh as your default Tmux shell
set-option -g default-shell /bin/zsh
# Set defualt terminal as xterm
set -g default-terminal "screen-256color"
# Binding
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# symbols to split the screen
bind | split-window -h
bind - split-window -v
# status bar
set -g status-bg colour243
set -g status-fg black
# enable activity alerts
setw -g monitor-activity on
set -g visual-activity on
# Center the window list
set -g status-justify centre
# Scrollback/History limit
set -g history-limit 2048
set -g @fpp-key 'm'
set -g @yank_selction 'clipboard'
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
# use the mouse
set -g mouse on
# vi is good
set-window-option -g mode-keys vi
# https://github.com/tmux/tmux/issues/543 -copy issue
# set -g default-shell $SHELL
# set -g default-command "reattach-to-user-namespace -l ${SHELL}"
# Artifically introduce some vim mappings
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection -x
bind-key -T copy-mode-vi Escape send -X cancel
# Tmux show if prefix is activated
set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'
# List of plugins
# Supports `github_username/repo` or full git repo URLs
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-yank \
tmux-plugins/tpm \
jbnicolai/tmux-fpp \
tmux-plugins/tmux-resurrect \
'
# for vim sessions for more info: https://github.com/tmux-plugins/tmux-resurrect/blob/master/docs/restoring_vim_and_neovim_sessions.md
set -g @resurrect-strategy-vim 'session'
# Other examples:
# github_username/plugin_name \
# [email protected]/user/plugin \
# [email protected]/user/plugin \
# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run-shell '~/.tmux/plugins/tpm/tpm'