-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
120 lines (92 loc) · 3.12 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# add truecolor support
set-option -ga terminal-overrides ",xterm-256color:Tc"
# default terminal is 256 colors
set -g default-terminal "xterm-256color"
# set default shell to ZSH
set -g default-shell /bin/zsh
# load mac specific settings
if-shell "uname | grep -q Darwin" "source-file ~/.tmux.mac.conf"
# load linux specific settings
if-shell "uname | grep -q Linux" "source-file ~/.tmux.linux.conf"
# load local settings if they exist
if-shell "[ -f ~/.tmux.local ]" "source-file ~/.tmux.private"
# set prefix from C-b to C-a
set -g prefix C-a
unbind C-b
# ensure that we can send Ctrl-A to other apps - (need to press twice)
bind C-a send-prefix
# increase delay between prefix and command
set -s escape-time 1
# set base index for windows and panes to 1 instead of 0
set -g base-index 1
setw -g pane-base-index 1
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# splitting panes with | and -
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# moving between panes with Prefix h, j, k, l
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind '\' select-pane -l
# resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# panes
set -g display-panes-time 2000
# vim
setw -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi C-h select-pane -L
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
bind 'C-l' send-keys 'C-l'
# history
set -g history-limit 50000
# buffers
unbind p
bind p paste-buffer
# window
bind r source-file ~/.tmux.conf \; display "Reloaded"
# panes
set -g pane-border-status bottom
# colours
set -g status-style fg=white,bg=black
set -g window-status-style fg=cyan,bg=black
set -g window-status-current-style fg=white,bold,bg=red
setw -g pane-border-style fg=green,bg=black
setw -g pane-active-border-style fg=black,bg=green
# message bar
set -g message-style fg=white,bold,bg=black
set -g status-left-length 40
set -g status-left "#[fg=green]s:#S #[fg=yellow]w:#I #[fg=cyan]p:#P"
set -g status-right "#{prefix_highlight} #(~/scripts/battery Discharging) | #[fg=cyan]%b %d %R"
set -g status-justify centre
# enable activity alerts
setw -g monitor-activity on
set -g visual-activity on
# don't suspend client
unbind-key C-z
# mouse
set -g mouse off
# plugin settings
set -g @logging-filename "tmux-#{window_name}.log"
set -g @screen-capture-filename "tmux-screen-#{window_name}.log"
set -g @save-complete-history-filename "tmux-history-#{window_name}.log"
set -g @open-S 'https://www.google.com/search?q='
# plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-logging' # easy logging and screen capturing
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# run plugins
run '~/.tmux/plugins/tpm/tpm'