This repository has been archived by the owner on Mar 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
tmux.conf
106 lines (79 loc) · 2.65 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
105
# Based on Thayer Williams' (http://cinderwick.ca) & Jason Ryan's (http://jasonwryan.com/)
#set -g default-path $HOME
# set correct term
set -g default-terminal screen-256color
# reload config without killing server
bind r source-file ~/.tmux.conf \; display-message " Config reloaded".
# more intuitive keybindings for splitting
unbind %
bind h split-window -v
unbind '"'
bind v split-window -h
# ctrl+up/down arrows cycles through windows
bind-key -n C-up next
bind-key -n C-down prev
bind-key -n C-k next
bind-key -n C-j prev
# navigate panes using ctrl+left/right arrows
bind-key -n C-left select-pane -t :.-
bind-key -n C-right select-pane -t :.+
bind-key -n C-u select-pane -t :.-
bind-key -n C-n select-pane -t :.+
# pane movement
bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
# set vi keys
set-window-option -g mode-keys vi
# copy & paste
unbind [
bind y copy-mode
unbind p
bind p paste-buffer
# send the prefix to client inside window (ala nested sessions)
bind-key g send-prefix
# confirm before killing a window or the server
bind-key k confirm kill-window
bind-key K confirm kill-server
bind-key X confirm kill-session
# toggle statusbar
bind-key b set-option status
# run a command in a new window
bind m command-prompt -p "run command:" "new-window 'exec %%'"
# scrollback buffer n lines
set -g history-limit 50000
# listen for activity on all windows
set -g bell-action any
set -g bell-on-alert on
# on-screen time for display-panes in ms
set -g display-panes-time 2000
# start window indexing at one instead of zero
set -g base-index 1
set -g renumber-windows on
# enable wm window titles
set -g set-titles on
# disable auto renaming
set-window-option -g automatic-rename on
# border colours
set -g pane-border-fg black
set -g pane-active-border-fg cyan
set -g pane-active-border-bg default
# wm window title string (uses statusbar variables)
set -g window-status-separator " "
set -g set-titles-string "[#I #W]"
set -g window-status-format "#I:#W"
set -g window-status-current-format "[#I:#W]"
# environment
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
# statusbar ---------------------------------------------------------------
set -g status-interval 1
# default statusbar colors
set -g status-fg white
set -g status-bg default
set -g status-attr dim
# command/message line colors
set -g message-fg white
set -g message-bg black
set -g message-attr dim
# Statusbar for X and X-less env.
if '[ -n "$DISPLAY" ]' 'source-file /usr/local/etc/tmux/inx'
if '[ -z "$DISPLAY" ]' 'source-file /usr/local/etc/tmux/xless'