-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
98 lines (79 loc) · 2.28 KB
/
Copy pathtmux.conf
File metadata and controls
98 lines (79 loc) · 2.28 KB
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
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
setw -g mode-keys vi
# remap prefix to Control + a
unbind C-b
set -g prefix C-a
# choose session
bind / choose-session
# behave like send to prefix
bind-key a send-prefix
# swapping windows by keeping Ctrl and press C-a+C-l twice
bind-key C-l last-window
# clear history
bind -n C-k clear-history
# saner copy-paste liek vim
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy Escape cancel
# hjkl to select pane
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize
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
setw -g aggressive-resize on
# number windows from 1
set -g base-index 1
set -g pane-base-index 1
# Better window spliting
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Customize status
set -g status-fg white
set -g status-bg black
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
setw -g window-status-fg green
setw -g window-status-bg black
setw -g window-status-attr dim
# Custom status bar
set -g status-left-length 32
set -g status-right-length 150
set -g status-interval 5
# Customize pane
set -g pane-border-fg green
set -g pane-border-bg default
set -g pane-active-border-fg green
set -g pane-active-border-bg default
# Highlight active window
set-window-option -g window-status-current-bg red
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
set -g history-limit 500000
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Allows for faster key repetition
set -s escape-time 1
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# set correct term
set-option -ga terminal-overrides ",xterm-256color:Tc"
# mouse mode
set -g mouse on
# Up will split a pane into a window
# Down will merge the window into previous pane. You have to select the
# original window and press Prefix Down
unbind Up
unbind Down
bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp