This repository has been archived by the owner on Apr 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
144 lines (114 loc) · 3.76 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
144
#=================================================
# Environment setup
#=================================================
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# set scrollback history to 10000 (10k)
set -g history-limit 10000
# set Ctrl-\ as the default prefix key combination
# and unbind C-b to free it up
set -g prefix C-'\'
unbind C-b
bind C-'\' send-prefix
# scrolling with terminal scroll bar
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# shorten command delay
set -sg escape-time 1
# set window and pane index to 1 (0 by default)
set-option -g base-index 1
setw -g pane-base-index 1
# enable mouse
setw -g mouse on
#=================================================
# Key Bindings
#=================================================
# reload ~/.tmux.conf using PREFIX r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# use PREFIX | to split window horizontally and PREFIX - to split vertically
unbind |
unbind %
bind | split-window -h
bind - split-window -v
# Make the current window the first window
bind T swap-window -t 1
# resize panes using PREFIX H, J, K, L
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# 24 hour clock
setw -g clock-mode-style 24
# kill K k
unbind K
bind K confirm-before "kill-window"
unbind k
bind k confirm-before "kill-window"
# :kB: focus up
unbind Tab
bind Tab select-pane -t:.+
unbind BTab
bind BTab select-pane -t:.-
# " windowlist -b
unbind '"'
bind '"' choose-window
# some copy paste
# move x clipboard into tmux paste abuffer
bind C-p run "xclip -o | tmux load-buffer -"
# move tmux copy buffer into x clipboard
bind C-y run "tmux save-buffer - | xclip -i -selection clipboard"
# quick view of processes
bind-key "~" split-window -h "exec htop"
# toggle mouse mode
unbind [
bind [ set mouse off
unbind ]
bind ] set mouse on
# function keys
unbind -n F5
unbind -n F6
unbind -n F7
unbind -n F8
unbind -n F9
unbind -n F10
unbind -n F11
bind-key F5 split-window -h
bind-key F6 split-window -v
bind-key F7 kill-pane
bind-key F8 select-pane -t :.+
bind-key F9 command-prompt "rename-window %%"
bind-key F10 new-window
bind-key F11 kill-window
bind-key F12 select-window -t :+
# C-\ C-\ switches to last window
bind-key C-'\' last-window
#=================================================
# Colour schemes
#=================================================
# set pane colors - highlight the active pane
set-option -g pane-border-style "fg=colour235"
set-option -g pane-active-border-style "fg=colour240"
# colorize messages in the command line
set-option -g message-style "bg=black,fg=brightred"
#=================================================
# Status Bar
#=================================================
set -g status on # turn the status bar on
set -g status-interval 5 # set update frequencey (default 15 seconds)
set -g status-justify left # left justify window list for clarity
set -g status-position bottom # position the status bar at bottom of screen
set -g renumber-windows on # automatically renumber windows when closed
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity off
set -g visual-silence off
set -g visual-bell off
# set colour for status bar
set -g status-style "bg=colour235,fg=yellow,dim"
# set window list colours
setw -g window-status-style "bg=colour236,fg=yellow,dim"
setw -g window-status-format ' #I:#W#F '
setw -g window-status-current-style "bg=colour238,fg=colour82,bold"
# show date and time on right side of status bar
set -g status-right-length 60
set -g status-left-length 60
set -g status-right "#[fg=colour233,bg=#e57373,bold] #h #[fg=colour233,bg=colour241,bold] %d %b %Y #[fg=colour233,bg=colour245,bold] %H:%M "