-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdot_tmux.conf.tmpl
135 lines (97 loc) · 3.69 KB
/
dot_tmux.conf.tmpl
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# UTF8 is autodetected in 2.2 onwards, but errors if explicitly set
# some configuration is taken from https://gist.github.com/NickLaMuro/1687643
new-session -n $HOST
set -g status on
set -g status-keys emacs
# set-option -g default-shell /bin/zsh
# Lowers the delay time between the prefix key and other keys - fixes pausing in vim
# taken from https://gist.github.com/NickLaMuro/1687643
set -sg escape-time 1
set-window-option -g mode-keys vi
# set-window-option xterm-keys on
# unbind C-b
set -g prefix C-b
# scrollback buffer n lines
set -g history-limit 10000
# Pane resize in all four directions using vi bindings.
set-option -g mouse on
# Open a new window and pane with the PWD of the pane where creation was initiated
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Use vim keybindings in copy mode
setw -g mode-keys vi
# vim-like pane switching
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
# # Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi 'v' send -X begin-selection
{{- if eq .chezmoi.os "darwin" }}
bind-key -T copy-mode-vi 'y' send -X copy-pipe "reattach-to-user-namespace pbcopy"
{{- end }}
{{- if eq .chezmoi.os "linux" }}
bind-key -T copy-mode-vi 'y' send -X copy-pipe "xclip -in -selection clipboard"
{{- end }}
{{- if eq .chezmoi.os "darwin" }}
# Patch for OS X pbpaste and pbcopy under tmux.
set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL"
{{- end }}
# # Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
set-option -ga terminal-overrides ',*:enacs@:smacs@:rmacs@:acsc@'
set -ga terminal-overrides ",xterm-256color:Tc"
# http://unix.stackexchange.com/questions/1045/getting-256-colors-to-work-in-tmux
# set -g default-terminal "screen-256color-italic"
set -g default-terminal "xterm-256color"
bind-key S choose-window "join-pane -v -s "%%""
bind-key V choose-window "join-pane -h -s "%%""
bind-key l last-window
## set window notifications
set-option -g visual-activity on
set-window-option -g monitor-activity on
set-window-option -g automatic-rename off
# Theme configuration
# set status bar
# -----------------------------------------------------
# https://github.com/jimeh/tmux-themepack/blob/master/basic.tmuxtheme
# Status update interval
set -g status-interval 1
# Basic status bar colors
set -g status-style bg=black,fg=cyan
# Left side of status bar
set -g status-left-style bg=black,fg=green
set -g status-left-length 40
set -g status-left "#S #[fg=white]» #[fg=yellow]#I #[fg=cyan]#P"
# Right side of status bar
set -g status-right-style bg=black,fg=cyan
set -g status-right-length 40
set -g status-right "« #[fg=yellow]%H:%M:%S #[fg=green]%d-%b-%y"
# Window status
set -g window-status-format " #I:#W#F "
set -g window-status-current-format " #I:#W#F "
# Current window status
set -g window-status-current-style bg=red,fg=black
# Window with activity status
set -g window-status-activity-style bg=black,fg=yellow
# Window separator
set -g window-status-separator ""
# Window status alignment
set -g status-justify centre
# Pane border
set -g pane-border-style bg=default,fg=default
# Active pane border
set -g pane-active-border-style bg=default,fg=green
# Pane number indicator
set -g display-panes-colour colour233
set -g display-panes-active-colour colour245
# Clock mode
# set -g clock-mode-colour red
# set -g clock-mode-style 24
# Message
set -g message-style bg=default,fg=default
# Command message
set -g message-command-style bg=default,fg=default
# Mode
set -g mode-style bg=red,fg=default