Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

tmuxp.plugin.TmuxpPlugin

Python
  • Python
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

API reference · Markdown

class tmuxp.plugin.TmuxpPlugin
class [source]
class [source]
class tmuxp.plugin.TmuxpPlugin

Base class for a tmuxp plugin.

Members

__init__

__init__ ( self , kwargs : Unpack[PluginConfigSchema] ) → None
method [source]
method [source]
__init__

Initialize plugin.

The default version values are set to the versions that the plugin system requires.

before_workspace_builder

before_workspace_builder ( self , session : Session ) → None
method [source]
method [source]
before_workspace_builder

Provide a session hook previous to creating the workspace.

This runs after the session has been created but before any of the windows/panes/commands are entered.

Parameters
  • session ( Session ) – session to hook into

Discussed in Workspace hooks and builders

on_window_create

on_window_create ( self , window : Window ) → None
method [source]
method [source]
on_window_create

Provide a window hook previous to doing anything with a window.

This runs runs before anything is created in the windows, like panes.

Parameters
  • window ( Window ) – window to hook into

Discussed in Workspace hooks and builders

after_window_finished

after_window_finished ( self , window : Window ) → None
method [source]
method [source]
after_window_finished

Provide a window hook after creating the window.

This runs after everything has been created in the window, including the panes and all of the commands for the panes. It also runs after the options_after has been applied to the window.

Parameters
  • window ( Window ) – window to hook into

Discussed in Workspace hooks and builders

before_script

before_script ( self , session : Session ) → None
method [source]
method [source]
before_script

Provide a session hook after the workspace has been built.

This runs after the workspace has been loaded with tmuxp load. It augments instead of replaces the before_script section of the workspace data.

This hook provides access to the LibTmux.session object for any behavior that would be used in the before_script section of the workspace file that needs access directly to the session object. This runs after the workspace has been loaded with tmuxp load.

The hook augments, rather than replaces, the before_script section of the workspace. While it is possible to do all of the before_script workspace in this function, if a shell script is currently being used for the workspace, it would be cleaner to continue using the script in the before_section.

If changes to the session need to be made prior to anything being built, please use before_workspace_builder instead.

Parameters
  • session ( Session ) – session to hook into

Discussed in Workspace Manager for Go (in development) , tmuxp load , Install and load a workspace , Go workspace internals , Go workspace builder behavior , Workspace hooks and builders , tmuxp compatibility and port status

reattach

reattach ( self , session : Session ) → None
method [source]
method [source]
reattach

Provide a session hook before reattaching to the session.

Parameters
  • session ( Session ) – session to hook into

Discussed in Workspace hooks and builders

Esc

Type to search.