-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.tmux.conf
94 lines (72 loc) · 2.31 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
# vim: ft=tmux
set -g default-command /bin/zsh
set -g default-terminal "tmux-256color"
# scrollback buffer n lines
set -g history-limit 5000
# listen for activity on all windows
set -g bell-action any
# on-screen time for display-panes in ms
set -g display-panes-time 2000
# start window and pane indexing at one
set -g base-index 1
set -g pane-base-index 1
# enable wm window titles
set -g set-titles on
# wm window title string (uses statusbar variables)
set -g set-titles-string "tmux: #I #W"
set -g window-status-format '#I #W#F'
set -g window-status-current-format '#[bg=colour8]#I #W#F'
# environment
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY GPG_AGENT_INFO GPG_TTY"
# border colours
set -g pane-border-style "fg=blue,bg=default"
set -g pane-active-border-style "fg=colour10"
set -g status-bg black
set -g status-fg white
set -g status-interval 10
set -g status-left-length 30
set -g status-left "#[fg=brightgreen]#S#{?pane_synchronized,#[fg=colour11] sync,}#[default] "
set -g status-right ''
# vi-style controls for copy mode
setw -g mode-keys vi
setw -g automatic-rename on
#setw -g monitor-activity on
#unbind none needed stuff
unbind n
unbind ]
# set prefix key to ctrl+a
unbind C-b
set -g prefix C-a
bind a send-prefix
unbind '"'
bind | split-window -h
unbind %
bind _ split-window -v
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -n C-right select-layout main-horizontal
bind -n C-up select-layout main-vertical
bind -n C-down select-layout tiled
# more vim like copy pasting
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -T copy-mode-vi 'v' send-keys X begin-selection
bind-key -T copy-mode-vi 'y' send-keys X copy-selection
# toggle last window like screen
bind C-a last-window
# copy tmux buffer to clipboard
bind C-y run "tmux show-buffer | xsel -i"
# move x clipboard into tmux paste buffer
bind C-p run "tmux set-buffer \"$(xsel -i -o)\"; tmux paste-buffer"
# reload config without killing server
bind R source-file ~/.tmux.conf \; display-message " Config reloaded..."
# confirm before killing a window
unbind &
bind K confirm kill-window
# use Ctrl-S to toggle pane syncronisation
bind C-S set -g synchronize-panes