-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
143 lines (111 loc) · 4.11 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#############################
########## Bindings
#############################
# Set the prefix to `ctrl + q` instead of `ctrl + b`
set -g prefix C-q
unbind C-b
# Use | and - to split a window vertically and horizontally instead of " and % respoectively
unbind '"'
unbind %
bind + split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Bind D to resize the window to be 8 lines smaller
bind D resize-pane -D 8
bind U resize-pane -U 4
# Move around panes with hjkl, as one would in vim after pressing ctrl + w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Switch betewen panes using Ctrl + arrow
bind -n C-Left select-pane -L
bind -n C-Right select-pane -R
bind -n C-Up select-pane -U
bind -n C-Down select-pane -D
# Use shift + arrow key to move between windows in a session
bind -n S-Left previous-window
bind -n S-Right next-window
# Open ~/.tmux.conf in vim and reload settings on quit
unbind e
bind e new-window -n '~/.tmux.conf' "sh -c 'vim ~/.tmux.conf && tmux source ~/.tmux.conf'"
# shortcut to source the .tmux.conf file
bind R source-file ~/.tmux.conf \; display "TMUX Conf Reloaded"
#############################
########## Settings
#############################
# 0 is too far from ` ;)
set -g base-index 1
set -g pane-base-index 0
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
# Copy/Paste
#bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -se c -i"
setw -g mode-keys vi
set -g mouse on
setw -g monitor-activity on
#set -g status-position bottom
#set -g status-bg colour237
#set -g status-fg colour137
#set -g status-right-length 100
#set -g status-left-length 70
# Default statusbar color
set-option -g status-style bg=colour237,fg=colour223 # bg=bg1, fg=fg1
# Default window title colors
set-window-option -g window-status-style bg=colour214,fg=colour237 # bg=yellow, fg=bg1
# Default window with an activity alert
set-window-option -g window-status-activity-style bg=colour237,fg=colour248 # bg=bg1, fg=fg3
# Active window title colors
set-window-option -g window-status-current-style bg=red,fg=colour237 # fg=bg1
# Set active pane border color
set-option -g pane-active-border-style fg=colour214
# Set inactive pane border color
set-option -g pane-border-style fg=colour239
# Message info
set-option -g message-style bg=colour239,fg=colour223 # bg=bg2, fg=fg1
# Writing commands inactive
set-option -g message-command-style bg=colour239,fg=colour223 # bg=fg3, fg=bg1
# Pane number display
set-option -g display-panes-active-colour colour1 #fg2
set-option -g display-panes-colour colour237 #bg1
# Clock
set-window-option -g clock-mode-colour colour109 #blue
# Bell
set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg
set-option -g status-left "\
#[fg=colour7, bg=colour241]#{?client_prefix,#[bg=colour167],} ❐ #S \
#[fg=colour241, bg=colour237]#{?client_prefix,#[fg=colour167],}#{?window_zoomed_flag, 🔍,}"
set-option -g status-right "\
#[fg=colour214, bg=colour237] \
#[fg=colour237, bg=colour214] #(~/dotfiles/tmux_scripts/music.sh) \
#[fg=colour223, bg=colour237] #(~/.tmux/scripts/uptime.sh) \
#[fg=colour246, bg=colour237] %b %d '%y\
#[fg=colour109] %H:%M \
#[fg=colour248, bg=colour239]"
set-window-option -g window-status-current-format "\
#[fg=colour237, bg=colour214]\
#[fg=colour239, bg=colour214] #I* \
#[fg=colour239, bg=colour214, bold] #W \
#[fg=colour214, bg=colour237]"
set-window-option -g window-status-format "\
#[fg=colour237,bg=colour239,noitalics]\
#[fg=colour223,bg=colour239] #I \
#[fg=colour223, bg=colour239] #W \
#[fg=colour239, bg=colour237]"
# Set the history limit so we get lots of scrollback.
setw -g history-limit 50000000
# =====================================
# === Renew environment ===
# =====================================
set -g update-environment \
"DISPLAY\
SSH_ASKPASS\
SSH_AUTH_SOCK\
SSH_AGENT_PID\
SSH_CONNECTION\
SSH_TTY\
WINDOWID\
XAUTHORITY"