forked from wasbazi/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
79 lines (61 loc) · 2.65 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
# enable pbcopy and pbpaste
set-option -g default-command "reattach-to-user-namespace -l zsh"
set-option -g default-shell /bin/zsh
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
unbind C-b
set -g prefix C-s
bind a send-prefix
set -g history-limit 10000
bind C clear-history
# splits
unbind s
bind s split-window
bind v split-window -h
# don't wait for an escape sequence after hitting
# Esc. fixes insert mode exit lag in vim
set -sg escape-time 0
# highlight window when it has new activity
setw -g monitor-activity off
# set -g visual-activity on
# increase repeat time for repeatable commands
set -g repeat-time 1000
# use 256 term for pretty colors
set -g default-terminal "xterm-256color"
# soften status bar color from harsh green to light gray
set -g status-bg '#666666'
set -g status-fg '#aaaaaa'
# set mark that prefix has been pressed
set -g status-right '#{?client_prefix,#[reverse]<Prefix>#[noreverse] ,}"#22T" %H:%M %d-%b-%y'
# highlight current window
set-window-option -g window-status-current-style bg=white,fg=black
# set-titles on
# set color of active pane
set -g pane-border-style bg=black,fg=white
set -g pane-active-border-style bg=black,fg=green
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
bind s split-window -v -c '#{pane_current_path}'
bind v split-window -h -c '#{pane_current_path}'
bind c new-window -c '#{pane_current_path}'
set-window-option -g mode-keys vi
# 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 @plugin 'tmux-plugins/tmux-yank'
# Other examples:
# github_username/plugin_name \
# [email protected]/user/plugin \
# [email protected]/user/plugin \
# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run '~/.tmux/plugins/tpm/tpm'