summaryrefslogtreecommitdiff
path: root/tmux.conf
blob: b6dec3461f692e561b1831dbc60876fd76f12270 (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
# Set the terminal (for colors + CTRL-arrows)
# by default, tmux sets $TERM to 'screen' - no need to change it.
###set-option -g default-terminal "screen-256color"

# Pass CTRL/SHIFT-arrows correctly
# (for both VIM and Emacs, this requires extra configuration in .vimrc/.emacs)
# To handle these keys if $TERM=="screen*"
set-window-option -g xterm-keys on

# Start numbering at 1
set -g base-index 1

# Start numbering at 1
set -g base-index 1

# Rather than constraining window size to the maximum size of any client 
# connected to the *session*, constrain window size to the maximum size of any 
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on

# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %

# Statusbar: Show only Hostname, no user/date/time
set -g status-right "#H"

# Alt-left/right -> next/prev window WITHOUT CTRL-B prefix.
#bind -n M-Left previous-window
#bind -n M-Right next-window

# Use Shift-Alt-Arrow keys without prefix key to switch panes
bind -n M-S-Left select-pane -L
bind -n M-S-Right select-pane -R
bind -n M-S-Up select-pane -U
bind -n M-S-Down select-pane -D

# Color taskbar based on server
if-shell 'hostname|grep -qw ^club'     'set -g status-bg blue ; set -g status-fg white'
if-shell 'hostname|grep -qw ^dj'       'set -g status-bg blue ; set -g status-fg white'
if-shell 'hostname|grep -qw ^dna'      'set -g status-bg magenta ; set -g status-fg black'
if-shell 'hostname|grep -qw ^gazpacho' 'set -g status-bg red ; set -g status-fg black'
if-shell 'hostname|grep -qw ^roofie'   'set -g status-bg white ; set -g status-fg black'