-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
89 lines (68 loc) · 2.32 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
86
87
88
89
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'dracula/tmux'
set -g status-keys vi
# prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# mouse
setw -g mouse on
setw -g alternate-screen on
# vim mode
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
set -g status-keys vi
# window
set-window-option -g automatic-rename on
set-window-option -g aggressive-resize
# dracula customizations
set -g @dracula-plugins "time"
set -g @dracula-show-powerline true
set -g @dracula-show-fahrenheit false
set -g @dracula-military-time false
set -g @dracula-show-left-icon session
set -g @dracula-border-contrast true
set -g @dracula-git-show-current-symbol ✓
# start window and pane numbering at 1.
set -g base-index 1
set -g pane-base-index 1
# don't wait for an escape sequence after seeing C-b.
set -sg escape-time 0
# create session
bind C-c new-session
# tmux session switcher
bind C-j new-window -n "session-switcher" "\
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
sed '/^$/d' |\
fzf --preview 'tmux capture-pane -pt {}' |\
xargs tmux switch-client -t"
# enable activity alerts
setw -g monitor-activity on
set -g visual-activity on
# quick view of processes
bind '~' split-window -v "exec htop"
# split current window horizontally
bind - split-window -v -c "#{pane_current_path}"
# split current window vertically
bind | split-window -h -c "#{pane_current_path}"
bind -r h select-pane -L # move left
bind -r j select-pane -D # move down
bind -r k select-pane -U # move up
bind -r l select-pane -R # move right
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# buffers
bind b list-buffers # list paste buffers
bind p paste-buffer # paste from the top paste buffer
bind P choose-buffer # choose which buffer to paste from
# Initialize TMUX plugin manager
run '~/.tmux/plugins/tpm/tpm'