-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
144 lines (98 loc) · 4.13 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
# ~/.tmux.conf Configuration File by Edouard Fazenda <[email protected]>
## General options
# Unbind the Key Prefix C-b (Default used by tmux)
unbind-key C-b
# Set default prefix to C-a (Globaly)
set-option -g prefix C-a
# Set delay to send the commands to the minimum (Globally / Server)
set-option -sg escape-time 1
# Set Index for Windows starting from "1" (Globaly)
set-option -g base-index 1
# Set Index for Panes under Windows starting from "1" (Globaly)
set-window-option -g pane-base-index 1
# Set mouse mode on
set-option -g mouse on
# Set default terminal emulator with support of 256 colors (To change to urxvt later)
set-option -g default-terminal "xterm-256color"
# Set default shell to /bin/bash
set-option -g default-shell /bin/bash
# Don't rename the windows automatically
set-option -g allow-rename off
## Customized Key Mapping for commands and user inputs
# Reload of the configuration ~/.tmux.conf and display a message
bind-key r source-file ~/.tmux.conf \; display "Configuration reloaded!"
# Sending the Prefix to other applications (Need to press twice the prefix in order to have it executed in the sub-application)
bind-key C-a send-prefix
# Set Split Window Horizontaly
bind-key | split-window -h
# Set Split Window Verticaly
bind-key - split-window -v
# Set Prefix h to move to the left (Pane)
bind-key h select-pane -L
# Set Prefix j to move to go down (Pane)
bind-key j select-pane -D
# Set Prefix k to go up (Pane)
bind-key k select-pane -U
# Set Prefix to move to the right (Pane)
bind-key l select-pane -R
# Set Prefix to resize the pane (Left increment by 5 with option -r (repeat))
bind-key -r H resize-pane -L 5
# Set Prefix to resize the pane (Down increment by 5 with option -r (repeat))
bind-key -r J resize-pane -D 5
# Set Prefix to resize the pane (Up increment by 5 with option -r (repeat))
bind-key -r K resize-pane -U 5
# Set Prefix to resize the pane (Right increment by 5 with option -r (repeat))
bind-key -r L resize-pane -R 5
# Set Prefix to capture the pane content
bind-key -r P capture-pane
# Set Prefix to save buffer to a file "tmux.buff"
bind-key -r B save-buffer ~/tmux.buff
# Set Prefix to printout the current buffer
bind-key -r b show-buffer
# Set Prefix to list the stack of buffers
bind-key -r l list-buffers
# Set Prefix to choose the stacked buffer
bind-key -r L choose-buffer
# Set Prefix to store output in log files
bind-key C-p pipe-pane -o "cat >> ~/#H-#S-#W.log" \; display "Toogled logging to ~/#H-#S-#W.log"
# Capture buffer and pipes its output to xclip
#bind-key C-c run "tmux save-buffer - | xclip -i -sel clipboard"
# Paste text from the system clipboard to a tmux session
#bind-key C-v run "tmux set-buffer \"$(xclip -o -sel clipboard\"; tmux paste-buffer"
## Status Bar / Pane / Windows Color and Configuration
# Status bar color
set-option -g status-fg white
set-option -g status-bg black
# Status window color
set-window-option -g window-status-fg cyan
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim
# Status window active color
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg red
set-window-option -g window-status-current-attr bright
# Pane color
set-option -g pane-border-fg green
set-option -g pane-border-bg black
# Pane active color
set-option -g pane-active-border-fg white
set-option -g pane-active-border-bg black
# Command line color
set-option -g message-fg white
set-option -g message-bg black
set-option -g message-attr bright
# Size and content of the left status bar
set-option -g status-left-length 40
set-option -g status-left "#[fg=green]Session : #S #[gf=yellow]#I #[fg=cyan]#P"
# Size and content of the right status bar
set-option -g status-right-length 50
set-option -g status-right "#[fg=cyan]#H | %d %b %R"
# Enable the UTF-8 support for the status bar
set-option -g status-utf8 on
# Set the interval of refresh for the status bar
set-option -g status-interval 60
# Set the window list in the center of the status bar
set-option -g status-justify centre
# Enable the monitor and the visual activity
set-window-option -g monitor-activity on
set-option -g visual-activity on