-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexecutable_dot_tmux.conf.tmpl
More file actions
132 lines (101 loc) · 3.83 KB
/
executable_dot_tmux.conf.tmpl
File metadata and controls
132 lines (101 loc) · 3.83 KB
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
# plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Helpers:
# To copy and paste hold shift whilst selecting and right clicking
# If in a split window, maximise first with bind-key z, then copy then toggle with bind-key z again
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Set 1 as first rather than 0
set -g base-index 1
# Try and resize to largest window
set-window-option -g aggressive-resize
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
# No delay for escape key press
set -sg escape-time 0
# Copying
# bind-key [ to enter copy mode, edit with vim commands then copy using y to copy into system clipboard
# paste using bind-key ]
# Copying to system clipboard requires:
# sudo apt-get install --assume-yes xclip
set -g mode-keys vi # use vim editing in copy mode, enter to finish
bind-key -T copy-mode-vi v send-keys -X begin-selection # copy using visual mode (v)
{{ if eq .chezmoi.os "linux" -}}
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' # copy into system clipboard
{{ else if eq .chezmoi.os "darwin" -}}
{{ end -}}
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle # rectangle selection with r
# set -g status-keys vi # use vim editing on the status
set -g history-limit 10000000
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
set-option -g default-terminal "screen-256color"
# setw -g mode-keys vi # ?
# setw -g monitor-activity on # ?
# v and s for split windows
bind-key v split-window -h
bind-key s split-window -v
# unbind '"'
# unbind %
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Vim style through panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Use Alt-vim keys without prefix key to switch panes
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Use Alt-arrow keys without prefix key to switch panes
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
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
###
# STYLING
###
# panes
set -g pane-border-style 'fg=colour2 bg=colour0'
set -g pane-active-border-style 'bg=colour0 fg=colour2'
# statusbar
#### COLOUR (Solarized dark)
# default statusbar colors
set-option -g status-style fg=yellow,bg=black #yellow and base02
# default window title colors
set-window-option -g window-status-style fg=brightblue,bg=default #base0 and default
#set-window-option -g window-status-style dim
# active window title colors
set-window-option -g window-status-current-style fg=brightred,bg=default #orange and default
#set-window-option -g window-status-current-style bright
# pane border
set-option -g pane-border-style fg=black #base02
set-option -g pane-active-border-style fg=brightgreen #base01
# message text
set-option -g message-style fg=brightred,bg=black #orange and base01
# pane number display
set-option -g display-panes-active-colour blue #blue
set-option -g display-panes-colour brightred #orange
# clock
set-window-option -g clock-mode-colour green #green
# bell
set-window-option -g window-status-bell-style fg=black,bg=red #base02, red
# window names
set-option -g status-interval 1
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
#set-option -sa terminal-overrides ',xterm-256color:RGB'
set-option -g default-terminal "tmux-256color"
# tell Tmux that outside terminal supports true color
set-option -sa terminal-overrides ",gnome-terminal:RGB"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'