Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

class libtmux-java latest

SessionSpec

How a session should be made.

Source and package
Qualified name
io.github.libtmux.SessionSpec
Package
io.github.libtmux
Distribution
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/SessionSpec.java
class io.github.libtmux.SessionSpec

Description#

The shape SplitSpec and WindowSpec use. tmux's -A, which attaches when the name is taken, is deliberately absent: attaching needs a terminal, and it fails with open terminal failed on every supported release when there is none. Asking Server#hasSession() first does the same job from a process that has no tty, which is where a library usually runs.

Examples#

Session build = server.newSession(s -> s.named("build").sized(new Dimensions(120, 40)));

Members14#

Common operations1#

  • Builder class Collects the choices, each named for what it does rather than for the field it sets.

Other members13#

  • argv method The command that makes this session, reporting it through format.
  • builder method A builder holding tmux's own defaults: a detached session tmux names itself.
  • clientFlags method Client flags, which tmux takes as one comma-separated list.
  • command method What the session's first pane runs, empty for the default shell.
  • detached method Always true, and not a choice.
  • detachOthers method Whether other clients on this session are detached.
  • directory method Where the session's first pane starts, or empty to inherit.
  • environment method Variables set for the new session, in the order they were given.
  • name method The session name, or empty to let tmux number it.
  • size method How big the session is, or empty for tmux's default.
  • toString method
  • windowName method The name of the session's first window, or empty for tmux's choice.
  • withoutSize method Whether tmux is told not to give the session a size at all.
Esc

Type to search.

Reference previewOpen reference