-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
110 lines (76 loc) · 3.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
# To apply changes, enter Command Mode (Prefix :) and enter source-file ~/.tmux.conf,
# close all tmux sessions or use Prefix-r from within tmux (see #Keybindings)
# Free the original Ctrl-b Prefix keybinding (it's wise to unbind/unbind-key the binding we're assigning a different binding too)
unbind C-b
# Setting the Prefix from Ctrl-b to Ctrl-a (-g, globally)
set -g prefix C-a
# Set the delay when sending commands to be more responsive
# Setting the delay between prefix and command (increases vim responsiveness)
set -sg escape-time 1
# Use vim key bindings
setw -g mode-keys vi
# Increase repeat time for repeatable commands
set -g repeat-time 1000
# Enable utf8 characters
setw -q -g utf8 on
# Increase scroll-back history
setw -g history-limit 10000
# Make the Window index start at 1 (instead of 0), so we can use Prefix 1 to jump to the first Window
set -g base-index 1
# Set the base index for panes to 1 instead of 0
set -g pane-base-index 1
# Enable/disable mouse to scroll through terminal buffer or select windows and panes
set -g mouse off
# Update the status line every sixty seconds
set -g status-interval 60
# Center the Window list in the status line
set -g status-justify centre
# Status line right side - 31 Oct 13:37
set -g status-right "#[fg=cyan]#h %d %b %R"
# Enable activity alerts
setw -g monitor-activity on
set -g visual-activity on
##### Keybindings #####
# Define `Prefix r` so it reloads the `.tmux.conf` file in the current session
# and make use of the display command to display the text "Reloaded!"
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Ensure that we can send Ctrl-a to other apps by pressing Ctrl-a twice
bind C-a send-prefix
# Start with blank name when renaming windows
unbind ,
bind-key , command-prompt -p (rename-window) "rename-window '%%'"
# Split pane vertically (Prefix |)
bind | split-window -h
# Split pane horizontally (Prefix -)
bind - split-window -v
# Moving between panes with Prefix h,j,k,l
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Quick window selection (cycle through windows, Prefix Ctrl-h/l)
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Resize Panes (Prefix H,J,K,L)
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
##### Colors #####
# Set the default terminal mode to 256color mode
set -g default-terminal "screen-256color"
# Make status line's text white, bold and background to black
setw -g status-style fg=white,bold,bg=black
# Set the color of the Window list
setw -g window-status-style fg=white,bg=black
# Set colors for the active Window
# setw -g window-status-current-style fg=white,bold,bg=red
setw -g window-status-current-style fg=black,bg=cyan
# Command line / Message line
set -g message-style fg=white,bold,bg=black
# Status line left side to show Session:window:pane
set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I:#[fg=cyan]#P"
# Set color of active pane
set-window-option -g pane-border-style "bg=black, fg=colour235"
set-window-option -g pane-active-border-style "bg=black, fg=green"