-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
73 lines (52 loc) · 1.68 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
# Kaush's tmux configuration
# https://kau.sh
# switch prefix key from Ctrl B → Ctrl A
# unbind-key C-b
# set-option -g prefix C-a
# bind-key C-a send-prefix
bind-key v split-window -h
bind-key s split-window -v
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
set-option -sg escape-time 0
set-option -g history-limit 5000
# automatically rename tmux-window to current path
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
# customize status bar colors
set-option -g status-bg "#2A2D2E"
set-option -g status-fg colour240
#set-option -g status-left ''
#set-option -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
#set-option -g status-right-length 50
#set-option -g status-left-length 20
set-window-option -g window-status-current-style fg=5
set-window-option -g mode-keys vi
set-window-option -g mouse on
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
# source tmux conf again
#tmux source ~/.tmux.conf
# v starts a selection and y finishes it in vi-mode
#bind-key -T copy-mode-vi 'v' send -X begin-selection
#bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
## commands
# show list of all sessions
# $ tmux ls
# create a new tmux session
# $ tmux new -s Session1
# attach to existing session
# $ tmux attach -t <session-number>
# kill specific session
# $ tmux kill-session -t <session-number>
# - detach from session
# Ctrl A + D
# - close pane
# Ctrl A + X
# - create new window
# Ctrl A + C