tmux workspace manager, forged in Ruby.
Session manager for tmux. Load tmux sessions through YAML/JSON configuration files. Powered by libtmux for Ruby.
Install
Install the workspace package separately from the core library.
$ gem install libtmux-workspacegem "libtmux-workspace"libtmux-workspace parses bounded YAML or JSON into an immutable creation
plan. validate and offline plan do not contact tmux. load and
plan --live borrow an existing server selected with --socket.
The manager creates a new session. It does not reconcile, replace, or delete a preexisting workspace. Applying a plan authorizes declared shell commands; their delivery does not prove that the pane programs completed.
Start here¶
- Guides covers
validate,plan, andload. - Topics explains the supported format and creation-only model.
- Examples provides a bounded YAML configuration.
- CLI Manual documents commands, flags, output and exit statuses.
- Language API documents the workspace gem.
The source-owned workspace guide is staged from the same revision as the generated reference.
Example workspaces
Each workspace below is a file that libtmux/libtmux-ruby
loads in a test or a scheduled run, as the list under it says. The drawing shows the panes of each window and the commands each pane receives.
Tiled layout
The tiled layout arranges the panes in a grid.
Also shows: two panes, environment
session_name: workenvironment: PROJECT_MODE: developmentwindows: - window_name: editor window_index: 1 layout: tiled panes: - shell_command: printf 'editor ready\n' - {}{ "session_name": "work", "environment": { "PROJECT_MODE": "development" }, "windows": [ { "window_name": "editor", "window_index": 1, "layout": "tiled", "panes": [ { "shell_command": "printf 'editor ready\\n'" }, {} ] } ]}Converted from the YAML; the tests load the YAML.
Source: examples/workspace.yaml
Loaded by:
-
test_installed_imports_use_declared_dependencies_without_starting_resources: Installs the gems into an isolated home and runs each installed example program in examples/manifest.json, including workspace_apply, which runs the installed libtmux-workspace executable on this file. (test/packaging/package_test.rb; a test runs the command) -
workspace_apply: Loads the file with Workspace.load and applies it through the library, then runs the libtmux-workspace executable's validate, plan and load on it. (examples/workspace_apply.rb; a test runs the command)