-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtmux.conf
112 lines (81 loc) · 3.58 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
# reset file first {{{1
# ------------------------------------------------------------------
# source-file ~/.tmux.reset.conf
# options {{{1
# ------------------------------------------------------------------
set -gq utf8 on
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'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
set -g history-limit 10000
set -g monitor-activity on
set -g default-shell $SHELL
# set -g default-command "reattach-to-user-namespace -l ${SHELL}"
set -g base-index 1
set -g pane-base-index 1
set -g allow-rename off
set -g renumber-windows on
set -g visual-activity on
# colors {{{1
# ------------------------------------------------------------------
set -g default-terminal "screen-256color"
set -g status-fg white
set -g status-bg black
set -g window-status-fg colour108 # colour108 is an olive color
set -g window-status-bg default
set -g window-status-attr dim
set -g window-status-current-fg colour156 # colour156 is a lime green color
set -g window-status-current-bg default
set -g window-status-current-attr bright
set -g pane-border-fg colour108
set -g pane-border-bg default
set -g pane-active-border-fg colour156
set -g pane-active-border-bg default
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# status bar {{{1
# ------------------------------------------------------------------
set -g status-justify centre
set -g status-left ' #S ⡇' # session name
set -g status-left-length 20
set -g status-right '#(sysctl vm.loadavg | cut -b 14-29)⡇ #H ' # host name
# tmp plugins {{{1
# ------------------------------------------------------------------
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'tmux-plugins/tmux-yank'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# key bindings {{{1
# ------------------------------------------------------------------
# remmapping copy and paste keys
unbind [
bind Enter copy-mode
unbind p
bind p paste-buffer
# Setup 'v' to begin selection as in Vim
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe-and-cancel
bind -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# recording program output to a log
bind P pipe-pane -o 'cat >> ~/#W-%s-tmux.log' \; display 'Toggled logging to ~/#W-%s-tmux.log'
# join/split panes
bind C-J command-prompt -p "join pane from:" "join-pane -s '%%'"
bind C-S command-prompt -p "split pane to:" "join-pane -t '%%'"
# vi is good
set -g mode-keys vi
# allow clearing of screen in a shell
bind C-l send-keys 'C-l'
# load project specific settings {{{1
# ------------------------------------------------------------------
if-shell 'test -f "~/.tmux.conf.local"' 'source-file ~/.tmux.conf.local'
# TIPS:
# setup environments with tmuxinator
# setup layouts inspecting :list-windows
# vim:fdl=1 fdm=marker