-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
executable file
·122 lines (96 loc) · 4.04 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
121
set-option -g history-limit 20000
set -g mouse on
set -g default-terminal "screen-256color"
set -g default-command "reattach-to-user-namespace -l zsh"
# styles
set -g status-style bg=default,fg=brightblack
set -g window-status-style bg=default,fg=white
set -g window-status-current-style bg=default,fg=cyan
set -g window-status-activity-style bg=default,fg=red
set -g pane-border-style bg=default,fg=brightblack
set -g pane-active-border-style bg=default,fg=white
set -g message-style bg=default,fg=yellow
setw -g pane-border-status bottom
setw -g pane-border-format '─'
# pane number display
set -g display-panes-active-colour cyan
set -g display-panes-colour white
# clock
setw -g clock-mode-colour yellow
# status bar
set -g status-interval 1
set -g status-justify centre
set -g status-left-length 40
set -g status-right-length 40
# dark
set -g status-left "#[fg=white,bg=black] #H #[bg=brightblack,fg=black]#[fg=brightblue,bg=brightblack,nobold] #{wifi_strength} #{battery_color_bg}#[fg=brightblack]#[fg=black] #{battery_percentage} #{battery_color_fg}#[bg=default,nobold]"
set -g status-right "#[fg=brightblack]#[fg=white,bg=brightblack] #(tmux-mem-cpu-load -a 0 -m 2 -g 5) #[fg=white,bg=brightblack]#[fg=black,bg=white] %H:%M:%S "
# light
#set -g status-left "#[fg=black,bg=white] #H #[bg=brightblue,fg=white]#[fg=brightblack,bg=brightblue,nobold] #{wifi_strength} #{battery_color_bg}#[fg=brightblue]#[fg=black] #{battery_percentage} #{battery_color_fg}#[bg=default,nobold]"
#set -g status-right "#[fg=brightcyan]#[fg=brightblack,bg=brightcyan] #(tmux-mem-cpu-load -a 0 -m 2 -g 10) #[fg=white,bg=brightcyan]#[fg=black,bg=white] %H:%M:%S "
set -g prefix C-a
bind-key C-a last-window
# Allows us to use C-a a <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix
# Start numbering at 1
set -g base-index 1
# Allows for faster key repetition
set -s escape-time 0
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Activity monitoring
setw -g monitor-activity on
set -g visual-activity off
#renumber windows plix
set-option -g renumber-windows on
# Vi copypaste mode
setw -g mode-keys vi
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'V' send -X select-line
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe "reattach-to-user-namespace pbcopy" \; send -X clear-selection
# Double LMB Select & Copy (Word)
bind-key -T copy-mode-vi DoubleClick1Pane \
select-pane \; \
send-keys -X select-word \; \
send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -n DoubleClick1Pane \
select-pane \; \
copy-mode -M \; \
send-keys -X select-word \; \
send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Triple LMB Select & Copy (Line)
bind-key -T copy-mode-vi TripleClick1Pane \
select-pane \; \
send-keys -X select-line \; \
send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -n TripleClick1Pane \
select-pane \; \
copy-mode -M \; \
send-keys -X select-line \; \
send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# hjkl pane traversal
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# fix pane_current_path on new window and splits
unbind '"'
bind '"' split-window -c "#{pane_current_path}"
unbind %
bind % split-window -h -c "#{pane_current_path}"
unbind c
bind c new-window -c "#{pane_current_path}"
unbind v
bind v split-window -h -c "#{pane_current_path}"
unbind b
bind b split-window -c "#{pane_current_path}"
unbind t
bind t choose-tree
run '~/.tmux/tmux-battery/battery.tmux'
run '~/.tmux/tmux-wifi/tmux-wifi.tmux'