Skip to content

v0.1.0

Choose a tag to compare

@atomicstack atomicstack released this 20 Mar 18:27
· 25 commits to main since this release

target-string APIs and missing surfaces

this release adds target-string methods and option struct extensions so
consumers can create and manipulate sessions, windows, and panes by tmux target
string (e.g. "mysession:2", "mysession:2.1") without needing materialized
Go objects. this is particularly useful for bulk session restore workflows.

new methods

  • Tmux.SplitWindow(target, opts) — split a pane by target string,
    with optional direction, start directory, detached mode, and startup command
  • Tmux.SelectLayout(target, layout) — apply a layout string (including
    custom checksum layouts) to a window by target string
  • Tmux.GlobalOption(key) — query server-level global options via
    show-option -gqv; returns empty string for unset options

extended option structs

  • NewWindowOptions — added Index *int (target a specific window index)
    and ShellCommand string (startup command as last positional arg)
  • SplitWindowOptions — added Detached bool (-d flag to keep focus on
    current pane)

notes

  • Tmux.SelectPane(target) and Tmux.SelectWindow(target) were already
    available since v0.0.1
  • SessionOptions.ShellCommand already supported startup commands for
    new-session since v0.0.1
  • no breaking changes — all existing APIs are unchanged

commits

  • e429228 feat: add Index and ShellCommand fields to NewWindowOptions
  • 7a1ce5f feat: add Detached to SplitWindowOptions; add Tmux.SplitWindow()
  • ffbb3c9 feat: add Tmux.GlobalOption() for server-level option queries
  • 0738282 feat: add Tmux.SelectLayout() for target-based layout selection