-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.tmux.conf
108 lines (95 loc) · 3.86 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
# BSD 4-Clause License
#
# Copyright (c) 2022, Vicente Adolfo Bolea Sanchez <[email protected]>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. All advertising materials mentioning features or use of this software must
# display the following acknowledgement:
# This product includes software developed by Vicente Adolfo Bolea Sanchez.
#
# 4. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Sane basics
unbind C-b
set -g prefix C-a
set -g allow-rename off
set -g base-index 1
set -g default-terminal "screen-256color"
set -g history-limit 20000
set -g visual-activity on
set -s escape-time 1
setw -g monitor-activity on
# Use vim bindings
setw -g mode-keys vi
# More responsive window navigation
bind C-a last-window
bind C-n next-window
bind C-p previous-window
bind C-c new-window
# Remap window navigation to vim
unbind-key j
unbind-key k
unbind-key h
unbind-key l
bind j select-pane -D
bind k select-pane -U
bind h select-pane -L
bind l select-pane -R
bind r source-file ~/.tmux.conf
# Set the title bar
set -g set-titles on
set -g set-titles-string "#h"
# set pane colors - hilight the active pane
set -g pane-border-style fg=colour235 #base02
set -g pane-active-border-style fg=colour240 #base01
# colorize messages in the command line
set -g message-style bg=black,fg=brightred,bright
#--------------------------------------------------------------------------Mouse
# Mouse integration (Version <= 2.0)
set -gq mouse-select-pane on
set -gq mouse-resize-pane on
set -gq mouse-select-window on
setw -gq mode-mouse on
# Mouse integration (Version >= 2.1)
set -gq mouse on
#---------------------------------------------------------------------Status Bar
set -g status on
set -g status-interval 30
set -g status-justify centre
set -g status-style bg=colour235,fg=yellow,dim
set -g status-left-length 76
set -g status-left "#[fg=brightred]: #(whoami)#[fg=green] : #h :"
set -g status-right "#[fg=blue] %d %b %Y : #[fg=green]%l:%M %p : #[fg=brightred]#(uptime | awk -F ' ' '{print $2}') :"
set -gq status-utf8 on
# set window list colors - red for active and cyan for inactive
set -g window-status-style fg=brightblue,bg=colour236,dim
set -g window-status-current-style fg=brightred,bg=colour236,bright
#---------------------------------------------------------------------Copy/Paste
bind Escape copy-mode # `tmux prefix + Escape` starts copy mode.
bind p paste-buffer
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection
bind -T copy-mode-vi Y send -X copy-end-of-line
bind -T copy-mode-vi Escape send -X cancel