[PotW] tmux
It’s another Tuesday (errm almost tuesday — I got a little busy), and that means another PotW! This program is a little more useful than the last program. And makes living a mac more bearable (or any non tiling window manager for that matter) Tmux is the bees knees when it comes to console multi-tasking. It allows you to do a faux-tiling window manager with all your console apps, and the best part is that it’s cross platform. Just a little info about tmux: It stands for terminal multiplexer (cool name for multiplier), tmux is like screen’s pretty cousin, tmux is highly configurable, and a lot more stuff that I’ll have to split up in a few more posts. (this is just a primer, and yes I will talk about tmux more
Program: tmux
Site Link: http://tmux.sourceforge.net
Download:
- Download direct: http://downloads.sourceforge.net/tmux/tmux-1.3.tar.gz
- Use CVS & get the newest version: CVS instructions for tmux
Installation:
- Use your package manager (pacman -S tmux for archlinux)
- Mac (download homebrew && sudo brew install tmux)
Compile:
./configure make -j8 (make with 8 jobs at once [compile faster on a core duo]) sudo make install
How to use:
Lets start with the basics. Fire up tmux, and lets learn how to get some, errrm, help!
- man tmux (best resource, and well documented)
- ^b ? (Ctrl-?) [Press Ctrl-b, then ?] (will show commands with short descriptions)
Lets start with some basics:
- make a new vertical pane: ^b % (Carat ‘^’ means Ctrl)
- make a new horizontal pane: ^b “
- make a new window: ^b c
- rename window: ^b ,
- move around: ^b (use arrow keys)
Now that you know your way around, lets have some fun:
- Find test in an open window: ^b f (this one tickles me pink, it’s so kewl that you can search for *anything*, and it will auto-move to the terminal your thinking of)
- enter copy mode to copy text in buffer: ^b [
- paste the text you've copied: ^b ]
- what time is it?: ^b t
- swap panes around: ^b { (previous pane) and } (next pane)
Screenshots:
Default Bindings (all the things you can do):
The default command key bindings are:
C-b Send the prefix key (C-b) through to the application.
C-o Rotate the panes in the current window forwards.
C-z Suspend the tmux client.
! Break the current pane out of the window.
" Split the current pane into two, top and bottom.
# List all paste buffers.
% Split the current pane into two, left and right.
& Kill the current window.
' Prompt for a window index to select.
, Rename the current window.
- Delete the most recently copied buffer of text.
. Prompt for an index to move the current window.
0 to 9 Select windows 0 to 9.
: Enter the tmux command prompt.
= Choose which buffer to paste interactively from a list.
? List all key bindings.
D Choose a client to detach.
[ Enter copy mode to copy text or view the history.
] Paste the most recently copied buffer of text.
c Create a new window.
d Detach the current client.
f Prompt to search for text in open windows.
i Display some information about the current window.
l Move to the previously selected window.
n Change to the next window.
o Select the next pane in the current window.
p Change to the previous window.
q Briefly display pane indexes.
r Force redraw of the attached client.
s Select a new session for the attached client interactively.
t Show the time.
w Choose the current window interactively.
x Kill the current pane.
{ Swap the current pane with the previous pane.
} Swap the current pane with the next pane.
~ Show previous messages from tmux, if any.
Page Up Enter copy mode and scroll one page up.
Up, Down
Left, Right
Change to the pane above, below, to the left, or to the right of the current pane.
M-1 to M-5 Arrange panes in one of the five preset layouts: even-horizontal, even-vertical, main-horizontal, main-vertical, or tiled.
M-n Move to the next window with a bell or activity marker.
M-o Rotate the panes in the current window backwards.
M-p Move to the previous window with a bell or activity marker.
C-Up, C-Down
C-Left, C-Right
Resize the current pane in steps of one cell.
M-Up, M-Down
M-Left, M-Right
Resize the current pane in steps of five cells.








