Workspace ManagerconceptAPI Reference

Choose documentation 2

latest

Current version

latest
English

Unreleased LibTmux has not been released. Its API may change during development. This site's structure and URLs may change too.

Workspace Manager: API Reference

LibTmux::Workspace

Versioned JSON configuration and owned orchestration

Description#

SYNOPSIS

use LibTmux::Workspace;
my $workspace = LibTmux::Workspace->from_json($json_octets);
my $plan = $workspace->plan(existing => 'error');
my $report = $workspace->load(server => $server);

COMMAND LINE

The packaged libtmux-workspace executable exposes validate, plan, and load. --dry-run selects planning without tmux I/O. See the installed executable's help for socket and repeat-application options.

Members4#

Common operations2#

  • load method load(server => $server, existing => 'error'|'skip') uses public LibTmux::Server operations. It checks all session-name conflicts before creation. error rejects any existing target with Conflict; skip leaves that entire session alone, so repeated application creates only absent sessions. A missing server permits explicit creation; other acquisition failures propagate.
  • new method new(config => $hashref) validates and copies a libtmux.workspace/v1 configuration. No I/O occurs. Sessions contain named windows with nonempty pane arrays. Each pane requires literal command arguments or an explicit shell_command. Environment values inherit from workspace, session, and window, with pane values taking precedence. All configuration errors throw Config.

Other members2#

  • from_json method Decode bounded UTF-8 JSON octets with core JSON::PP and call "new". Reject unsupported versions, unknown keys, invalid commands, and duplicate names. YAML is not part of this distribution.
  • plan method plan(existing => 'error'|'skip') returns a fresh data plan in input order. It performs no tmux I/O or mutations. A dry-run does not prove live availability or command success. Exports share no mutable arrays with the loader. No context-dependent return values are used.
Esc

Type to search.

Reference previewOpen reference