Skip to content

tmux integration

Available since v0.10

Use the tmux subcommand to extract the screen or history directly from a running tmux session and convert it to SVG.

Open another window or pane inside a tmux session, or run the command from an outside shell.

Terminal
console2svg tmux capture -o tmux-current.svg

If --target is not specified, a menu appears for selecting the pane to capture.

Style options can be specified in the same way as in capture mode.

Terminal
console2svg tmux capture -d macos-pc -t github-dark -o tmux-current.svg

Specify the target pane identifier with --target.

Terminal
# Select pane 1 in window 0
console2svg tmux capture -o pane1.svg --target ":0.1"

To capture previous output as well, specify the number of lines to retrieve with --history.

Terminal
# Generate a capture including the previous 100 lines
console2svg tmux capture -o long-log.svg --history 100

With no argument, all available history is included.

Terminal
console2svg tmux capture -o full-log.svg --history

You can also use the live-server feature for a tmux pane. Its arguments are the same as live-server.

Terminal
console2svg tmux live-server