-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
104 lines (80 loc) · 2.95 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
# first thing first
set -g default-terminal "screen-256color"
# start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set -sg escape-time 1
# use Ctrl-a as the default prefix
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# I <3 Vim
set -g mode-keys vi
set -g status-keys vi
# v, y and p as in vim
bind Escape copy-mode
unbind P
bind P paste-buffer
# bind -t vi-copy 'v' begin-selection
# bind -t vi-copy 'y' copy-selection
# extra commands for interacting with the ICCCM clipboard
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# set scrollback to 250000 or roughly 32MB per pane
set -g history-limit 250000
# show user@host as windown title
set -g set-titles on
set -g set-titles-string "#T"
# pass focus events to vim
set -g focus-events on
# easy-to-remember split pane commands
bind c new-window -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
unbind '"'
unbind %
# start new window with current path
bind - split-window -v -c "#{pane_current_path}"
# moving between panes with vim movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# moving between windows with vim movement keys
bind -r C-h previous-window
bind -r C-l next-window
# moving between sessions with vim movement keys
bind -r C-k switch-client -p \; refresh-client -S
bind -r C-j switch-client -n \; refresh-client -S
# Some keybindings from Byobu
bind -n F2 new-window \; rename-window "-"
bind -n C-S-F2 new-session
# moving between windows with Alt-Left/Alt-Right
bind -n M-Left previous-window
bind -n M-Right next-window
# moving between sessions with Alt-Up/Alt-Down
bind -n M-Up switch-client -p \; refresh-client -S
bind -n M-Down switch-client -n \; refresh-client -S
# resize panes with vim movement keys
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
# highlight activity
set -g monitor-activity on
set -g visual-activity off
# colors
set -g status-bg 'colour233'
set -g status-justify 'left'
set -g status-left-length '100'
set -g status 'on'
set -g status-right-length '100'
set -g status-left '#[fg=colour195,bg=colour25,bold] #S #[fg=colour25,bg=colour233,nobold,nounderscore,noitalics]'
set -g status-right '#[fg=colour233,bg=colour233,nobold,nounderscore,noitalics]#[fg=colour240,bg=colour233] #(whoami)@#H #[fg=colour195,bg=colour25,bold] %d %B %Y %I:%M%p '
setw -g window-status-format '#[fg=colour233,bg=colour233,nobold,nounderscore,noitalics]#[default] #I:#W #[fg=colour233,bg=colour233,nobold,nounderscore,noitalics]'
setw -g window-status-current-format '#[fg=colour233,bg=colour236,nobold,nounderscore,noitalics]#[fg=colour145,bg=colour236] #I:#W #[fg=colour236,bg=colour233,nobold,nounderscore,noitalics]'