forked from bohoomil/darkcourses
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
118 lines (88 loc) · 3.03 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
106
107
108
109
110
111
112
113
114
115
116
117
# Based on Thayer Williams' (http://cinderwick.ca) & Jason Ryan's (http://jasonwryan.com/)
# set prefix key to ctrl+a
unbind C-b
set -g prefix C-a
# 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
# navigate panes using ctrl+left/right arrows
bind-key -n C-left select-pane -t :.-
bind-key -n C-right 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
setw -g mode-keys vi
# copy & paste
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
# send the prefix to client inside window (ala nested sessions)
bind-key g send-prefix
# toggle last window like screen
bind-key C-b last-window
# 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 "split-window -h 'exec %%'"
# 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 indexing at one instead of zero
set -g base-index 1
# enable wm window titles
set -g set-titles on
# disable auto renaming
setw -g automatic-rename on
# border colours
set -g pane-border-fg green
set -g pane-active-border-bg default
set -g pane-active-border-fg blue
# wm window title string (uses statusbar variables)
set -g set-titles-string "tmux:#I [ #W ]"
# session initialization
bind S source-file ~/.config/tmux/session
# environment
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
# statusbar ---------------------------------------------------------------
set -g status-interval 1
set -g status-justify centre # center align window list
set -g status-right-length 60
set -g status-left-length 150
set -g status-right '#[fg=cyan] up: #($HOME/bin/uptime.sh) #[default]'
set -g status-left '#[fg=cyan]#h [#S]#[default]'
# 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 default
set -g message-attr dim
# default window title colors
set-window-option -g window-status-fg black
set-window-option -g window-status-bg default
set-window-option -g window-status-attr bright
# active window title colors
set-window-option -g window-status-current-fg blue
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr bright
# alerts
set-window-option -g window-status-alert-fg white
set-window-option -g window-status-alert-bg red
set-window-option -g window-status-alert-attr bright