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

WindowSpec

How a window should be made.

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

Description#

The shape SplitSpec uses, for the same reasons: a description that contacts nothing, so it can be named, reused, and applied wherever it fits.

Examples#

Window logs = session.newWindow(w -> w.named("logs").running("journalctl", "-f"));

Members13#

Common operations1#

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

Other members12#

  • argv method The command that makes this window, reporting it through format.
  • builder method A builder holding tmux's own defaults: a detached window at the end, running a shell.
  • command method What the window's first pane runs, empty for the session's shell.
  • detached method Whether the window is left unselected.
  • directory method Where the window's first pane starts, or empty to inherit.
  • environment method Variables set for the new window, in the order they were given.
  • index method The index the window is created at, or empty for the next one tmux has free.
  • name method The name the window is created with, or empty to let tmux choose.
  • placement method Where the window is inserted, or empty for tmux's own choice of index.
  • replaceExisting method Whether a window already at the target index is destroyed to make room.
  • reuseExisting method Whether a window that already carries this name is selected instead of a second being made.
  • toString method
Esc

Type to search.

Reference previewOpen reference