-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
executable file
·85 lines (65 loc) · 2.33 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
74
75
76
77
78
79
80
81
82
83
84
85
# System clipboard copy/paste
# bind C-y run "tmux saveb - | xsel -i --clipboard"
# bind C-p run "tmux set-buffer \"$(xsel -o)\"; tmux paste-buffer"
# System clipboard copy/paste
# bind C-y run "tmux saveb - | pbcopy"
# bind C-p run "tmux set-buffer \"$(pbpaste)\"; tmux paste-buffer"
# Genereal options
set -g default-terminal "xterm-256color"
# truecolor support
set-option -sa terminal-features ',xterm-kitty:RGB'
# Fix ctrl + arrow to move between lines
set-window-option -g xterm-keys on
# Disable rename
set-option -g allow-rename off
# Count windows and panes from 1
set -g base-index 1
setw -g pane-base-index 1
# History Limit
set -g history-limit 99999
# Set a Ctrl-a shortcut for reloading your tmux config
bind r source-file ~/.tmux.conf
# Change prefix
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# Move like vi
setw -g mode-keys vi
# Move panes like vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Split in panes
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind T break-pane
bind g last-window
# target-pane (or src-pane or dst-pane) may be a pane ID or takes a similar
# form to target-window but with the optional addition of a period followed by
# a pane index or pane ID, for example: `mysession:mywindow.1'. If the pane
# index is omitted, the currently active pane in the specified window is used.
# The following special tokens are available for the pane index:
bind b command-prompt -p "join pane from:" "join-pane -s '%%'"
bind s command-prompt -p "send pane to:" "join-pane -t '%%'"
bind-key e send-keys "tmux capture-pane -p -S - | nvim -c 'set buftype=nofile' +" Enter
set -s escape-time 0 # Delay
# kill session
unbind x
bind x kill-pane
bind X kill-session
# auto re-order windows
set-option -g renumber-windows on
bind C-h swap-window -d -t -1
bind C-l swap-window -d -t +1
set -g mouse on
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'alejandrodnm/tmux-colors-nick'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'robhurring/tmux-spotify'
set -g @yank_action 'copy-pipe'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'