-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
82 lines (59 loc) · 2.26 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
# improve colors
set -g default-terminal 'screen-256color'
# setting vim key binding for moving in copy mode PREFIX + [
set -g mode-keys vi
set -g default-shell /bin/zsh
# changing prefix key from Ctrl-b to Ctrl-a
#set -g prefix C-a , i use gdb a lot and this doesn't work well
#unbind C-b
set -g prefix C-b
set -g status-right "#(acpi -b | cut -d' ' -f3,4)"
# create new windows/panes in same directory
bind c new-window -c "#{pane_current_path}"
bind "\"" split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# fast reloading of source file
# for my configuration you have to create a link to dot_files/tmux.conf
# you can use -n flag so that you don't have to press PREFIX key again and again
bind r source-file ~/.tmux.conf \; display "Reloaded!!" #multiple commands can be
# separated by \;
# binding pane creation to their respective visual keys
# for me | -> vertical splitting
# and - -> horizontal splitting
# let's get rid of default keys bindings
unbind |
unbind -
# my favourite keybinding ;)
# will create the new in current directory
bind -r | split-window -h -c "#{pane_current_path}"
bind -r - split-window -v -c "#{pane_current_path}"
# i love vim
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# -r make the task repeatable without pressing PREFIX again and again
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
# set repeat-time 1000
# start window numbers at 1 to match keyboard order with tmux order
set -g base-index 1
# start pane numbers at 1 to match keyboard order with tmux order
setw -g pane-base-index 1
# for status bar update time-interval change
# set -g status-interval 60
# for set center window list
# set -g status-justify center
# if something new happen on new window then we want to be notified
setw -g monitor-activity on
set -g visual-activity on
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# monitor windows for activity
setw -g monitor-activity on
# don't wait for escape sequences
set -sg escape-time 0
# display pane numbers for longer
set -g display-panes-time 2000