![]() |
![]()
| ![]() |
![]()
NAMExpanes, tmux-xpanes - Ultimate terminal divider powered by tmux SYNOPSISNormal modexpanes [OPTIONS] argument ... Pipe modecommand ... | xpanes [OPTIONS] [<utility> ...] DESCRIPTIONxpanes and tmux-xpanes (alias of xpanes) commands have following features.
OPTIONS
-l <layout>
FORMATDefault value is "[:ARG:].log.%Y-%m-%d_%H-%M-%S".
In addition, sequences same as date(1) command are
available.
SHELL VARIABLES
MODES[Normal mode1] Outside of tmux session.When the tmux is not open and xpanes is executed on the normal terminal, the xpanes's behavior is as follows:
[Normal mode2] Inside of tmux session.When the tmux is already open and xpanes is executed on the existing tmux session, the command's behavior is as follows:
[Pipe mode] Inside of tmux session & Accepting standard input.When xpanes accepts standard input (i.e, xpanes follows another command and pipe |) under Normal mode2 , xpanes's behavior is going to be the special one called "Pipe mode". Pipe mode has two features.
EXAMPLESSimple examplexpanes 1 2 3 4 +-------------------------------+-------------------------------+ |$ echo 1 |$ echo 2 | |1 |2 | | | | | | | | | | | | | | | | | | | +-------------------------------+-------------------------------+ |$ echo 3 |$ echo 4 | |3 |4 | | | | | | | | | | | | | | | | | | | +-------------------------------+-------------------------------+ -c option and -I optionxpanes -I@ -c 'seq @' 1 2 3 4 +-------------------------------+-------------------------------+ |$ seq 1 |$ seq 2 | |1 |1 | | |2 | | | | | | | | | | | | | | | | +-------------------------------+-------------------------------+ |$ seq 3 |$ seq 4 | |1 |1 | |2 |2 | |3 |3 | | |4 | | | | | | | | | | +-------------------------------+-------------------------------+ Ping multiple hostsxpanes -c "ping {}" 192.168.1.{5..8} +-------------------------------+-------------------------------+ |$ ping 192.168.1.5 |$ ping 192.168.1.6 | | | | | | | | | | | | | | | | | | | | | | +-------------------------------+-------------------------------+ |$ ping 192.168.1.7 |$ ping 192.168.1.8 | | | | | | | | | | | | | | | | | | | | | | +-------------------------------+-------------------------------+ Run commands without opening a login shellxpanes -s -c "seq {}" 2 3 4 5 +-------------------------------+-------------------------------+ |1 |1 | |2 |2 | |Pane is dead: Press [Enter] to |3 | |exit... |Pane is dead: Press [Enter] to | | |exit... | | | | | | | | | | | | | | | | +-------------------------------+-------------------------------+ |1 |1 | |2 |2 | |3 |3 | |4 |4 | |Pane is dead: Press [Enter] to |5 | |exit... |Pane is dead: Press [Enter] to | | |exit... | | | | | | | | | | +-------------------------------+-------------------------------+ Display host alwaysxpanes -t -c "ping {}" 192.168.1.{5..8} +-------------------------------+-------------------------------+ |$ ping 192.168.1.5 |$ ping 192.168.1.6 | | | | | | | | | | | | | | | | | | | | | | +--192.168.1.5------------------+--192.168.1.6------------------+ |$ ping 192.168.1.7 |$ ping 192.168.1.8 | | | | | | | | | | | | | | | | | | | | | | +--192.168.1.7------------------+--192.168.1.8------------------+ Use SSH without key checkingxpanes --ssh myuser1@host1 myuser2@host2 +-------------------------------+-------------------------------+ |$ ssh -o StrictHostKeyChecking |$ ssh -o StrictHostKeyChecking | |=no myuser@host1 |=no myuser@host2 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-------------------------------+-------------------------------+ Create new panes on existing window+-------------------------------+-------------------------------+ |$ |$ | | | | | | | | | | | | | | | | | | | | | | +-------------------------------+-------------------------------+ | $ xpanes -x 4 5 6 | | | | | | | | | | | | | | | +-------------------------------+-------------------------------+ +-------------------------------+-------------------------------+ |$ |$ | | | | | | | | | | | | | +-------------------------------+-------------------------------+ |$ xpanes -x 4 5 6 |$ echo 4 | |$ |4 | | |$ | | | | | | | +-------------------------------+-------------------------------+ |$ echo 5 |$ echo 6 | |5 |6 | |$ |$ | | | | | | | +-------------------------------+-------------------------------+ Execute different commands on the different panesxpanes -e "top" "vmstat 1" "watch -n 1 free" +-------------------------------+------------------------------+ |$ top |$ vmstat 1 | | | | | | | | | | | | | | | | | | | +-------------------------------+------------------------------+ |$ watch -n 1 free | | | | | | | | | | | | | +--------------------------------------------------------------+ Change layout of panes (using presets)xpanes -l ev -c "{}" "top" "vmstat 1" "watch -n 1 df" +-------------------------------------------------------------+ |$ top | | | | | | | | | +-------------------------------------------------------------+ |$ vmstat 1 | | | | | | | | | +-------------------------------------------------------------+ |$ watch -n 1 df | | | | | | | | | +-------------------------------------------------------------+ Change layout of panes (Fixed number of columns)xpanes -C 2 AAA BBB CCC DDD EEE FFF GGG HHH III +------------------------------+------------------------------+ |$ echo AAA |$ echo BBB | | | | | | | +------------------------------+------------------------------+ |$ echo CCC |$ echo DDD | | | | | | | +------------------------------+------------------------------+ |$ echo EEE |$ echo FFF | | | | | | | +------------------------------+------------------------------+ |$ echo GGG |$ echo HHH | | | | | | | +------------------------------+------------------------------+ Pipe modeseq 3 | xpanes +------------------------------+------------------------------+ |$ echo 1 |$ echo 2 | |1 |2 | | | | | | | | | | | | | | | | | | | +------------------------------+------------------------------+ |$ echo 3 | |3 | | | | | | | | | | | | | +------------------------------+------------------------------+ Pipe mode with an argumentseq 4 | xpanes seq +-------------------------------+------------------------------+ |$ seq 1 |$ seq 2 | | | | | | | | | | | | | | | | | | | | | | +-------------------------------+------------------------------+ |$ seq 3 |$ seq 4 | | | | | | | | | | | | | | | | | | | | | | +-------------------------------+------------------------------+ SEE ALSOtmux(1) AUTHOR AND COPYRIGHTCopyright (c) 2023 Yamada, Yasuhiro ⟨yamada@gr3.ie⟩ Released under the MIT License. ⟨https://github.com/greymd/tmux-xpanes⟩ ACKNOWLEDGEMENTSThanks to Yamada, Yuka for her awesome logo ⟨https://github.com/greymd/tmux-xpanes/wiki/Image-Library⟩.
|