-
Notifications
You must be signed in to change notification settings - Fork 5
/
.tmux.conf
98 lines (78 loc) · 2.43 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
90
91
92
93
94
95
96
97
98
unbind C-b
# Set prefix to o from b
# https://jeffawang.com/posts/how-i-use-tmux/#tmux-prefix
#unbind-key C-\\
#set -g prefix C-\\
#bind-key C-\\ send-prefix
unbind C-b
unbind C-Space
set -g prefix C-Space
bind C-Space send-prefix
#included in sensible plugin
set -g history-limit 50000
set -s escape-time 0
set -g assume-paste-time 0
#color
set -g default-terminal "screen-256color"
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Allows for faster key repetition
set -s escape-time 0
bind-key N new-session
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# ===============
# Pane and layout
# src: https://github.com/jeffawang/dotfiles/blob/master/tmux.conf
# ===============
# Zoom/maximize the current pane
unbind x
bind x resize-pane -Z
bind | split-window -h -c "#{pane_current_path}"
bind _ split-window -c "#{pane_current_path}"
bind C-l resize-pane -R 10
bind C-k resize-pane -U 10
bind C-j resize-pane -D 10
bind C-h resize-pane -L 10
bind * resize-pane -x 80
bind ) swap-pane -D
bind ( swap-pane -U
bind = setw synchronize-panes
bind-key @ select-layout even-horizontal
bind-key ! select-layout even-vertical
bind l select-layout -n
bind L select-layout -p
# switch panes using Alt-arrow without prefix
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
# cycle though panes with double ctrl+A
unbind ^A
bind ^A select-pane -t :.+
#https://coderwall.com/p/rkstvg/clear-pane-in-tmux
bind -n C-k send-keys -R \; clear-history
# shorten command delay
set -sg escape-time 1
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# don't rename windows automatically
set-option -g allow-rename off
# TPM
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @plugin 'dracula/tmux'
set -g @dracula-show-powerline true
set -g @dracula-show-flags true
set -g @dracula-plugins "cpu-usage ram-usage time"
set -g @dracula-left-icon-padding 0
set -g @dracula-military-time true
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'