-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
90 lines (69 loc) · 2.54 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
# UTF-8
setw -g utf8 on
set -g status-utf8 on
setw -g window-status-current-format "|#I:#W|"
# Use C-a instead of C-b as the prefix
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# Double C-a to back to last window
bind-key C-a last-window
#set 256 colors
#set -g default-terminal "screen-256color"
# set default shell
set -g default-command "exec /bin/bash"
set -g display-time 2000
# set vi style key binding
set -g status-keys vi
setw -g mode-keys vi
# be more responsive, changing the default delay
set -sg escape-time 1
# set scrollback
set -g history-limit 10000
# Start numbering at 1
set -g base-index 1
setw -g pane-base-index 1
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# automatic window renaming
set-window-option -g automatic-rename on
# aggresive resize
setw -g aggressive-resize on
# Saner splitting.
bind v split-window -h
bind s split-window -v
bind S choose-session
# Pane resizing
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
# hardstatus line theme
set-option -g status-fg white
set-option -g status-bg default
set-option -g status-justify left
set-option -g status-left-length 16
set-option -g status-left '#[fg=green][ #[fg=black,bright]#h #[fg=green,nobright]][#[default]'
set-option -g status-right-length 16
set-option -g status-right '#[fg=green][ #[fg=black,bright]%d/%m %H:%M #[fg=green,nobright]]#[fg=default]'
set-window-option -g window-status-current-format '#[fg=red,bg=default]( #[fg=white,bright,bg=default]#I:#W#[fg=red,nobright,bg=default] )#[fg=default]'
# C + <-|-> word move
set-option -g xterm-keys
# Activity
setw -g monitor-activity on
set -g visual-activity on
# Mouse stuff
setw -g mode-mouse off
setw -g mouse-select-window off
setw -g mouse-select-pane off
setw -g mouse-resize-pane off
# Log output to a text file on demand
bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"
# Start windows in ~ directory always
bind c neww -c "$HOME"
# move between panes
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"