-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
64 lines (53 loc) · 2.36 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
# Version-specific commands [grumble, grumble]
# See: https://github.com/tmux/tmux/blob/master/CHANGES
# tmux version is "tmux MAJOR.MINOR{letter}
set -g default-terminal "tmux-256color"
# restore ctrl + arrows
set-window-option -g xterm-keys on
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Enable mouse
set -g mouse on
set -g set-titles on
set-option -g status-interval 1
set-option -g allow-rename off
set-option -g automatic-rename on
set-option -g automatic-rename-format "#(sh -c 'cd #{pane_current_path} && basename $(git rev-parse --show-toplevel)')"
set-option -g renumber-windows on
# powerline :-)
run-shell "powerline-daemon -q"
# if-shell 'env "$POWERLINE_CONFIG_COMMAND" tmux setup' '' 'run-shell "~/.venvs/powerline/bin/powerline-config tmux setup"'
run-shell "powerline-config tmux setup"
# split in current directory
bind '%' split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind '"' split-window -v -c '#{pane_current_path}' # Split panes vertically
# new window opens on HOME
bind 'c' new-window -c "$HOME"
# decent history size
# Note: same as tmux-sensible
set-option -g history-limit 100000
# share clipboard with X
# vi selection style
# Newer versions
# Selection / copy / paste
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi V send -X select-line
bind-key -T copy-mode-vi C-v send -X rectangle-toggle
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -selection clipboard -in'
# advice of neovim (:checkhealth) to make autoread work (focus-event already set by tmux-sensible)
set-option -sa terminal-overrides ',xterm-256color:RGB'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'egel/tmux-gruvbox'
# set -g @tmux-gruvbox 'dark' # or 'dark'
# if tpm is not present, install it.
# tricks from https://github.com/tmux-plugins/tpm/blob/master/docs/automatic_tpm_installation.md
# TODO at the moment it is done by my deployment scripts. Should I do it here instead?
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'mkdir -p ~/.tmux/plugins && git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'