summaryrefslogtreecommitdiff
path: root/dotfiles/tmux.conf
blob: 2e7b8e1789610d5b1dac704718fefeb721890acd (plain)
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
# set the prefix to C-A
unbind C-b
set -g prefix C-a
bind C-a send-prefix

set -g default-terminal "tmux-256color"
set -g aggressive-resize on
set -g set-titles on
set -g mode-keys vi

set -g xterm-keys on

# -,| do a horizontal/vertical split
unbind-key %
unbind-key '"'
bind - split-window -v -c '#{pane_current_path}'
bind | split-window -h -c '#{pane_current_path}'

# spawn new shells in the current path
bind c new-window -c '#{pane_current_path}'

# activity/silence monitoring
## mark windows with activity/silence monitoring with "A/S"
set -g window-status-format "#I:#W#F\
#{?monitor-activity,A,}\
#{?monitor-silence,S,}\
"
set -g window-status-current-format "#I:#W#F\
#{?monitor-activity,A,}\
#{?monitor-silence,S,}\
"

bind t setw monitor-activity
bind T command-prompt -p "Monitor for silent interval (secs):" 'setw monitor-silence %%'

set-option -g history-limit 16384
set-option -g update-environment "\
 DISPLAY\
 GTK_IM_MODULE\
 QT_IM_MODULE\
 SSH_ASKPASS\
 SSH_AUTH_SOCK\
 SSH_AGENT_PID\
 SSH_CONNECTION\
 WINDOWID\
 XAUTHORITY\
 DBUS_SESSION_BUS_ADDRESS\
"

# style the border of the active pane
set -g pane-active-border-style "fg=black bg=colour116"

# configure the status line
set -g status-right "#[fg=colour178]#H#[default]|%a %F %H:%M"
set -g status-right-length 48

set -g status-style fg=colour194,bold,bg=colour23

set -g window-status-current-style bg=black

# source the machine-specific file
if-shell "[ -f ~/.config/tmux_local.conf ]" 'source ~/.config/tmux_local.conf'