A new multiplexed world

And voila, I knew this was going to happen, I finally switched to tmux. I will not explain here why this software is better than GNU screen, simply put, tmux is now part of the base system of nearly all BSD derivative operating systems (NetBSD among them), and it makes my life easier.

Instead, I’ll point out here all the resources that helped me switching rather quickly:

Here’s my ~/.tmux.conf, which is pretty much the standard screen-keys.conf available with the package, with only some small customizations like the status bar and some fixes:

Set the prefix to ^Q.

unbind C-b
set -g prefix ^Q
bind q send-prefix

Bind appropriate commands similar to screen.

lockscreen ^X x

unbind ^X
bind ^X lock-server
unbind x
bind x lock-server

screen ^C c

unbind ^C
bind ^C new-window
unbind c
bind c new-window

detach ^D d

unbind ^D
bind ^D detach

displays *


next ^@ ^N sp n

unbind ^@
bind ^@ next-window
unbind ^N
bind ^N next-window
unbind “ “
bind “ “ next-window
unbind n
bind n next-window

title A

unbind A
bind A command-prompt “rename-window %%”

other ^A

unbind ^A
bind ^A last-window

prev ^H ^P p ^?

unbind ^H
bind ^H previous-window
unbind ^P
bind ^P previous-window
unbind p
bind p previous-window
unbind BSpace
bind BSpace previous-window

windows ^W w

unbind ^W
bind ^W list-windows
unbind w
bind w list-windows

quit \

unbind \
bind \ confirm-before “kill-server”

kill K k

unbind K
bind K confirm-before “kill-window”
unbind k
bind k confirm-before “kill-window”

redisplay ^L l

unbind ^L
bind ^L refresh-client
unbind l
bind l refresh-client

:kB: focus up

unbind Tab
bind Tab select-pane -t:.+
unbind BTab
bind BTab select-pane -t:.-


unbind |
bind | split-window -h
unbind -
bind - split-window -v

“ windowlist -b

unbind ‘“‘
bind ‘“‘ choose-window

unbind r
bind r source ~/.tmux.conf

set -g terminal-overrides ‘xterm*:smcup@:rmcup@:colors=256’

Status Bar

set -g default-terminal “screen”

default statusbar colors

set -g status-fg white
set -g status-bg colour235

current or active window in status bar

set-window-option -g window-status-current-bg colour53
set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-format ‘[ #W ]’

alerted window in status bar (bell, activity or content).

set-window-option -g window-status-alert-bg colour235
set-window-option -g window-status-alert-fg colour53
set-window-option -g window-status-alert-attr reverse

set -g status-right-length 40
set -g status-left-length 40

#set -g status-left ‘#[fg=purple]#H #[fg=black,bright]#[default]’
set -g status-left ‘#[fg=colour153]#H #[default]’
set -g status-right ‘#[fg=colour141]#(sysctl vm.loadavg|cut -f2-4 -d” “)#[default] | #[fg=colour117]%H:%M ‘

In order to pick up the right colors, I used a shell snippet I took from this github repository:

for i in {0..255} ; do
printf “\x1b[38;5;${i}mcolour${i}\n”

Mandatory screenshot: