Skip to main content

Crate ytil_zellij

Crate ytil_zellij 

Source
Expand description

Query and control Zellij sessions and panes via the CLI.

Thin wrappers around zellij subcommands for session management, pane control, focus, and text injection.

Structs§

Session
A Zellij session with its plain name and ANSI-formatted display string.

Enums§

Direction
Cardinal direction for pane operations.

Constants§

BIN 🔒

Functions§

action
Runs zellij action <args…>.
attach_session
Attaches to a Zellij session by name.
delete_session
Deletes an exited (resurrectable) Zellij session by name.
edit
Opens $EDITOR on path in a new pane in the given direction.
focused_pane_command
Returns the running command of the currently focused pane by parsing zellij action list-clients.
forward
Forwards arbitrary arguments to zellij with inherited stdio.
help
Prints zellij --help directly to the terminal, preserving ANSI colors.
is_active
Returns true when the process is running inside a Zellij session.
kill_session
Kills running Zellij session by name.
list_sessions
Returns all running Zellij sessions as (name, display) pairs.
move_focus
Moves focus to the pane in the given direction.
new_pane
Opens a new pane running command in the given direction.
new_session_with_layout
Creates a new Zellij session with the given layout and attaches to it.
pane_count
Returns the number of panes in the current tab.
resize_increase
Calls zellij action resize increase <direction> the given number of times.
run_interactive 🔒
Runs a Command with inherited stdio so the child process can interact with the terminal directly (preserving ANSI colors, TTY detection, and interactivity).
write_byte
Sends a raw byte (e.g. 27 for ESC) to the focused pane.
write_chars
Types a string into the focused pane as if the user typed it.