# Python API reference

Source: https://libtmux.org/en/py/latest/reference/

> Types, methods, and functions in libtmux for Python.

Python API

2539 symbols, extracted from source. Every type name in a signature links to its own entry; every cross-reference in a doc comment resolves against the same table.

Server 1 type, 2 functions and constants

[Server 98 members](https://libtmux.org/en/py/latest/reference/libtmux-server/)

tmux(1) Server \[server\_manual].

* \_fetch\_or\_empty ( *server : [Server](https://libtmux.org/en/py/latest/reference/libtmux-server/ "libtmux.Server")&#x20;*, *list\_cmd : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*, *kwargs : [t.Any](https://docs.python.org/3/library/typing.html#typing.Any "t.Any (Python)")&#x20;*) → [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[dict](https://docs.python.org/3/library/stdtypes.html#dict "dict (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [t.Any](https://docs.python.org/3/library/typing.html#typing.Any "t.Any (Python)")]]

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/server.py#L65)] [¶](#libtmux.server._fetch_or_empty "Permalink to _fetch_or_empty")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/server.py#L65)] [¶](#libtmux.server._fetch_or_empty "Permalink to _fetch_or_empty")

  \_fetch\_or\_empty

  Wrap [`fetch_objs` ](https://libtmux.org/en/py/latest/reference/libtmux-neo-fetch_objs/): treat a not-yet-started server as empty.

  A fresh [`Server` ](https://libtmux.org/en/py/latest/reference/libtmux-server/)can be introspected via [`Server.sessions` ](https://libtmux.org/en/py/latest/reference/libtmux-server-sessions/), [`Server.windows` ](https://libtmux.org/en/py/latest/reference/libtmux-server-windows/), etc. before the daemon is up. Other tmux errors, such as socket permission failures, still propagate.

- \_is\_daemon\_not\_up\_error ( *stderr\_text : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/server.py#L52)] [¶](#libtmux.server._is_daemon_not_up_error "Permalink to _is_daemon_not_up_error")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/server.py#L52)] [¶](#libtmux.server._is_daemon_not_up_error "Permalink to _is_daemon_not_up_error")

  \_is\_daemon\_not\_up\_error

  Return True if the error indicates the tmux server is not running.

  tmux signals this in two ways: 1. "no server running" (socket exists but no daemon is listening) 2. "error connecting to ... (No such file or directory)" (socket file is missing)

Session 1 type, 2 functions and constants

[Session 248 members](https://libtmux.org/en/py/latest/reference/libtmux-session/)

tmux(1) Session \[session\_manual].

* SessionDict = dict\[str, t.Any]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L34)] [¶](#libtmux.common.SessionDict "Permalink to SessionDict")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L34)] [¶](#libtmux.common.SessionDict "Permalink to SessionDict")

  SessionDict

- session\_check\_name ( *session\_name : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)")&#x20;*) → [None](https://docs.python.org/3/library/constants.html#None "None (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L653)] [¶](#libtmux.common.session_check_name "Permalink to session_check_name")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L653)] [¶](#libtmux.common.session_check_name "Permalink to session_check_name")

  session\_check\_name

  Raise exception session name invalid, modeled after tmux function.

  tmux(1) session names may not be empty, or include periods or colons. These delimiters are reserved for noting session, window and pane.

  * Parameters

    * **session\_name** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Name of session.

  * Raises

    * [exc.BadSessionName](https://libtmux.org/en/py/latest/reference/libtmux-exc-badsessionname/ "libtmux.exc.BadSessionName") – Invalid session name.

Window 2 types, 3 functions and constants

[WindowDirection 2 members](https://libtmux.org/en/py/latest/reference/libtmux-constants-windowdirection/)

Used for \*adjustment\* in [`Session.new_window()` ](https://libtmux.org/en/py/latest/reference/libtmux-session-new_window/).

[Window 254 members](https://libtmux.org/en/py/latest/reference/libtmux-window/)

tmux(1) Window \[window\_manual].

* WINDOW\_DIRECTION\_FLAG\_MAP : [dict](https://docs.python.org/3/library/stdtypes.html#dict "dict (Python)")\[[WindowDirection](https://libtmux.org/en/py/latest/reference/libtmux-constants-windowdirection/ "libtmux.constants.WindowDirection"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] = { WindowDirection.Before: "-b", WindowDirection.After: "-a", }

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/constants.py#L32)] [¶](#libtmux.constants.WINDOW_DIRECTION_FLAG_MAP "Permalink to WINDOW_DIRECTION_FLAG_MAP")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/constants.py#L32)] [¶](#libtmux.constants.WINDOW_DIRECTION_FLAG_MAP "Permalink to WINDOW_DIRECTION_FLAG_MAP")

  WINDOW\_DIRECTION\_FLAG\_MAP

- WindowDict = dict\[str, t.Any]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L35)] [¶](#libtmux.common.WindowDict "Permalink to WindowDict")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L35)] [¶](#libtmux.common.WindowDict "Permalink to WindowDict")

  WindowDict

* WindowOptionDict = dict\[str, t.Any]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L36)] [¶](#libtmux.common.WindowOptionDict "Permalink to WindowOptionDict")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L36)] [¶](#libtmux.common.WindowOptionDict "Permalink to WindowOptionDict")

  WindowOptionDict

Pane 2 types, 2 functions and constants

[PaneDirection 4 members](https://libtmux.org/en/py/latest/reference/libtmux-constants-panedirection/)

Used for \*adjustment\* in [`Pane.split()` ](https://libtmux.org/en/py/latest/reference/libtmux-pane-split/).

[Pane 257 members](https://libtmux.org/en/py/latest/reference/libtmux-pane/)

tmux(1) Pane \[pane\_manual].

* PANE\_DIRECTION\_FLAG\_MAP : [dict](https://docs.python.org/3/library/stdtypes.html#dict "dict (Python)")\[[PaneDirection](https://libtmux.org/en/py/latest/reference/libtmux-constants-panedirection/ "libtmux.constants.PaneDirection"), [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]] = { # -v is assumed, but for explicitness it is passed PaneDirection.Above: \["-v", "-b"], PaneDirection.Below: \["-v"], PaneDirection.Right: \["-h"], PaneDirection.Left: \["-h", "-b"], }

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/constants.py#L47)] [¶](#libtmux.constants.PANE_DIRECTION_FLAG_MAP "Permalink to PANE_DIRECTION_FLAG_MAP")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/constants.py#L47)] [¶](#libtmux.constants.PANE_DIRECTION_FLAG_MAP "Permalink to PANE_DIRECTION_FLAG_MAP")

  PANE\_DIRECTION\_FLAG\_MAP

- PaneDict = dict\[str, t.Any]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L37)] [¶](#libtmux.common.PaneDict "Permalink to PaneDict")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L37)] [¶](#libtmux.common.PaneDict "Permalink to PaneDict")

  PaneDict

Client 1 type

[Client 186 members](https://libtmux.org/en/py/latest/reference/libtmux-client/)

tmux(1) Client \[client\_manual].

Hooks 1 type, 3 functions and constants

[HooksMixin 12 members](https://libtmux.org/en/py/latest/reference/libtmux-hooks-hooksmixin/)

Mixin for manager scoped hooks in tmux.

* HOOK\_SCOPE\_FLAG\_MAP : [dict](https://docs.python.org/3/library/stdtypes.html#dict "dict (Python)")\[[OptionScope](https://libtmux.org/en/py/latest/reference/libtmux-constants-optionscope/ "libtmux.constants.OptionScope"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] = { OptionScope.Server: "-g", OptionScope.Session: "", OptionScope.Window: "-w", OptionScope.Pane: "-p", }

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/constants.py#L80)] [¶](#libtmux.constants.HOOK_SCOPE_FLAG_MAP "Permalink to HOOK_SCOPE_FLAG_MAP")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/constants.py#L80)] [¶](#libtmux.constants.HOOK_SCOPE_FLAG_MAP "Permalink to HOOK_SCOPE_FLAG_MAP")

  HOOK\_SCOPE\_FLAG\_MAP

- HookDict = dict\[str, t.Any]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/hooks.py#L53)] [¶](#libtmux.hooks.HookDict "Permalink to HookDict")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/hooks.py#L53)] [¶](#libtmux.hooks.HookDict "Permalink to HookDict")

  HookDict

* HookValues = dict\[int, str] | SparseArray\[str] | list\[str]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/hooks.py#L54)] [¶](#libtmux.hooks.HookValues "Permalink to HookValues")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/hooks.py#L54)] [¶](#libtmux.hooks.HookValues "Permalink to HookValues")

  HookValues

Options 2 types

[OptionScope 4 members](https://libtmux.org/en/py/latest/reference/libtmux-constants-optionscope/)

Scope used with `set-option` and `show-option(s)` commands.

[OptionsMixin 12 members](https://libtmux.org/en/py/latest/reference/libtmux-options-optionsmixin/)

Mixin for managing tmux options based on scope.

Options — Functions 6 functions and constants

* convert\_value ( *value : [\_V](https://libtmux.org/en/py/latest/reference/libtmux-options-_v/ "libtmux.options._V") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)")&#x20;*) → [ConvertedValue](https://libtmux.org/en/py/latest/reference/libtmux-options-convertedvalue/ "libtmux.options.ConvertedValue") | [\_V](https://libtmux.org/en/py/latest/reference/libtmux-options-_v/ "libtmux.options._V") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L182)] [¶](#libtmux.options.convert_value "Permalink to convert_value")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L182)] [¶](#libtmux.options.convert_value "Permalink to convert_value")

  convert\_value

  Convert raw option strings to python types.

  Examples

  ```python
  >>> convert_value("on")
  True
  >>> convert_value("off")
  False
  ```

  ```python
  >>> convert_value("1")
  1
  >>> convert_value("50")
  50
  ```

  ```python
  >>> convert_value("%50")
  '%50'
  ```

- convert\_values ( *value : [\_V](https://libtmux.org/en/py/latest/reference/libtmux-options-_v/ "libtmux.options._V") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)")&#x20;*) → [ConvertedValues](https://libtmux.org/en/py/latest/reference/libtmux-options-convertedvalues/ "libtmux.options.ConvertedValues") | [\_V](https://libtmux.org/en/py/latest/reference/libtmux-options-_v/ "libtmux.options._V") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L217)] [¶](#libtmux.options.convert_values "Permalink to convert_values")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L217)] [¶](#libtmux.options.convert_values "Permalink to convert_values")

  convert\_values

  Recursively convert values to python types via [`convert_value` ](https://libtmux.org/en/py/latest/reference/libtmux-options-convert_value/).

  \>>> convert\_values(None)

  \>>> convert\_values("on") True >>> convert\_values("off") False

  \>>> convert\_values(\["on"]) \[True] >>> convert\_values(\["off"]) \[False]

  \>>> convert\_values({"window\_index": "1"}) {'window\_index': 1}

  \>>> convert\_values({"visual-bell": "on"}) {'visual-bell': True}

* explode\_arrays ( *\_dict : [UntypedOptionsDict](https://libtmux.org/en/py/latest/reference/libtmux-options-untypedoptionsdict/ "libtmux.options.UntypedOptionsDict")&#x20;*, *force\_array : [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)") = False&#x20;*) → [ExplodedUntypedOptionsDict](https://libtmux.org/en/py/latest/reference/libtmux-options-explodeduntypedoptionsdict/ "libtmux.options.ExplodedUntypedOptionsDict")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L334)] [¶](#libtmux.options.explode_arrays "Permalink to explode_arrays")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L334)] [¶](#libtmux.options.explode_arrays "Permalink to explode_arrays")

  explode\_arrays

  Explode flat, naive options dict's option arrays.

  Examples

  ```python
  >>> import io
  ```

  ```python
  >>> many_more_options = io.StringIO(r'''
  ... terminal-features[0] xterm*:clipboard:ccolour:cstyle:focus
  ... terminal-features[1] screen*:title
  ... ''')
  >>> many_more_flat_dict = parse_options_to_dict(many_more_options)
  >>> many_more_flat_dict == {
  ... "terminal-features[0]": "xterm*:clipboard:ccolour:cstyle:focus",
  ... "terminal-features[1]": "screen*:title",}
  True
  >>> explode_arrays(many_more_flat_dict) == {
  ... "terminal-features": {0: "xterm*:clipboard:ccolour:cstyle:focus",
  ... 1: "screen*:title"}}
  True
  ```

  tmux arrays allow non-sequential indexes, so we need to support that:

  ```python
  >>> explode_arrays(parse_options_to_dict(io.StringIO(r'''
  ... terminal-features[0] xterm*:clipboard:ccolour:cstyle:focus
  ... terminal-features[5] screen*:title
  ... '''))) == {
  ... "terminal-features": {0: "xterm*:clipboard:ccolour:cstyle:focus",
  ... 5: "screen*:title"}}
  True
  ```

  Use `force_array=True` for hooks, which always use array format:

  ```python
  >>> from libtmux._internal.sparse_array import SparseArray
  ```

  ```python
  >>> hooks_output = io.StringIO(r'''
  ... session-renamed[0] display-message 'renamed'
  ... session-renamed[5] refresh-client
  ... pane-focus-in[0] run-shell 'echo focus'
  ... ''')
  >>> hooks_exploded = explode_arrays(
  ...     parse_options_to_dict(hooks_output),
  ...     force_array=True,
  ... )
  ```

  Each hook becomes a SparseArray preserving indices:

  ```python
  >>> isinstance(hooks_exploded["session-renamed"], SparseArray)
  True
  >>> hooks_exploded["session-renamed"][0]
  "display-message 'renamed'"
  >>> hooks_exploded["session-renamed"][5]
  'refresh-client'
  >>> sorted(hooks_exploded["session-renamed"].keys())
  [0, 5]
  ```

- explode\_complex ( *\_dict : [ExplodedUntypedOptionsDict](https://libtmux.org/en/py/latest/reference/libtmux-options-explodeduntypedoptionsdict/ "libtmux.options.ExplodedUntypedOptionsDict")&#x20;*) → [ExplodedComplexUntypedOptionsDict](https://libtmux.org/en/py/latest/reference/libtmux-options-explodedcomplexuntypedoptionsdict/ "libtmux.options.ExplodedComplexUntypedOptionsDict")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L439)] [¶](#libtmux.options.explode_complex "Permalink to explode_complex")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L439)] [¶](#libtmux.options.explode_complex "Permalink to explode_complex")

  explode\_complex

  Explode arrayed option's complex values.

  Examples

  ```python
  >>> import io
  ```

  ```python
  >>> explode_complex(explode_arrays(parse_options_to_dict(io.StringIO(r'''
  ... terminal-features[0] xterm*:clipboard:ccolour:cstyle:focus
  ... terminal-features[5] screen*:title
  ... '''))))
  {'terminal-features': {'xterm*': ['clipboard', 'ccolour', 'cstyle', 'focus'], 'screen*': ['title']}}
  ```

  ```python
  >>> explode_complex(explode_arrays(parse_options_to_dict(io.StringIO(r'''
  ... terminal-features[0] xterm*:clipboard:ccolour:cstyle:focus
  ... terminal-features[5] screen*:title
  ... ''')))) == {
  ... "terminal-features": {"xterm*": ["clipboard", "ccolour", "cstyle", "focus"],
  ... "screen*": ["title"]}}
  True
  ```

  ```python
  >>> explode_complex(explode_arrays(parse_options_to_dict(io.StringIO(r'''
  ... command-alias[0] split-pane=split-window
  ... command-alias[1] splitp=split-window
  ... command-alias[2] "server-info=show-messages -JT"
  ... ''')))) == {
  ... "command-alias": {"split-pane": "split-window",
  ... "splitp": "split-window",
  ... "server-info": "show-messages -JT"}}
  True
  ```

  ```python
  >>> explode_complex(explode_arrays({"terminal-features": {0: "xterm*:clipboard:ccolour:cstyle:focus",
  ... 1: "screen*:title"}}))
  {'terminal-features': {0: 'xterm*:clipboard:ccolour:cstyle:focus', 1: 'screen*:title'}}
  ```

  ```python
  >>> explode_complex(explode_arrays({"terminal-features": {0: "xterm*:clipboard:ccolour:cstyle:focus",
  ... 8: "screen*:title"}})) == SparseArray({'terminal-features': {0:
  ... 'xterm*:clipboard:ccolour:cstyle:focus', 8: 'screen*:title'}})
  True
  ```

  ```python
  >>> explode_complex(explode_arrays(parse_options_to_dict(io.StringIO(r'''
  ... terminal-overrides[0] xterm-256color:Tc
  ... terminal-overrides[1] *:U8=0
  ... ''')))) == {
  ... "terminal-overrides": {"xterm-256color": {"Tc": None},
  ... "*": {"U8": 0}}}
  True
  ```

  ```python
  >>> explode_complex(explode_arrays(parse_options_to_dict(io.StringIO(r'''
  ... user-keys[100] "\e[test"
  ... user-keys[6] "\e\n"
  ... user-keys[0] "\e[5;30012~"
  ... ''')))) == {
  ... "user-keys": {0: "\\e[5;30012~",
  ... 6: "\\e\\n",
  ... 100: "\\e[test"}}
  True
  ```

  ```python
  >>> explode_complex(explode_arrays(parse_options_to_dict(io.StringIO(r'''
  ... status-format[0] "#[align=left range=left #{E:status-left-style}]#[push-default]#{T;=/#{status-left-length}:status-left}#[pop-default]#[norange default]#[list=on align=#{status-justify}]#[list=left-marker]<#[list=right-marker]>#[list=on]#{W:#[range=window|#{window_index} #{E:window-status-style}#{?#{&&:#{window_last_flag},#{!=:#{E:window-status-last-style},default}}, #{E:window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{E:window-status-bell-style},default}}, #{E:window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{E:window-status-activity-style},default}}, #{E:window-status-activity-style},}}]#[push-default]#{T:window-status-format}#[pop-default]#[norange default]#{?window_end_flag,,#{window-status-separator}},#[range=window|#{window_index} list=focus #{?#{!=:#{E:window-status-current-style},default},#{E:window-status-current-style},#{E:window-status-style}}#{?#{&&:#{window_last_flag},#{!=:#{E:window-status-last-style},default}}, #{E:window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{E:window-status-bell-style},default}}, #{E:window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{E:window-status-activity-style},default}}, #{E:window-status-activity-style},}}]#[push-default]#{T:window-status-current-format}#[pop-default]#[norange list=on default]#{?window_end_flag,,#{window-status-separator}}}#[nolist align=right range=right #{E:status-right-style}]#[push-default]#{T;=/#{status-right-length}:status-right}#[pop-default]#[norange default]"
  ... status-format[1] "#[align=centre]#{P:#{?pane_active,#[reverse],}#{pane_index}[#{pane_width}x#{pane_height}]#[default] }"
  ... ''')))) == {
  ... "status-format": {0: "#[align=left range=left #{E:status-left-style}]#[push-default]#{T;=/#{status-left-length}:status-left}#[pop-default]#[norange default]#[list=on align=#{status-justify}]#[list=left-marker]<#[list=right-marker]>#[list=on]#{W:#[range=window|#{window_index} #{E:window-status-style}#{?#{&&:#{window_last_flag},#{!=:#{E:window-status-last-style},default}}, #{E:window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{E:window-status-bell-style},default}}, #{E:window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{E:window-status-activity-style},default}}, #{E:window-status-activity-style},}}]#[push-default]#{T:window-status-format}#[pop-default]#[norange default]#{?window_end_flag,,#{window-status-separator}},#[range=window|#{window_index} list=focus #{?#{!=:#{E:window-status-current-style},default},#{E:window-status-current-style},#{E:window-status-style}}#{?#{&&:#{window_last_flag},#{!=:#{E:window-status-last-style},default}}, #{E:window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{E:window-status-bell-style},default}}, #{E:window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{E:window-status-activity-style},default}}, #{E:window-status-activity-style},}}]#[push-default]#{T:window-status-current-format}#[pop-default]#[norange list=on default]#{?window_end_flag,,#{window-status-separator}}}#[nolist align=right range=right #{E:status-right-style}]#[push-default]#{T;=/#{status-right-length}:status-right}#[pop-default]#[norange default]",
  ... 1: "#[align=centre]#{P:#{?pane_active,#[reverse],}#{pane_index}[#{pane_width}x#{pane_height}]#[default] }",
  ... }}
  True
  ```

* handle\_option\_error ( *error : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*) → [type](https://docs.python.org/3/library/functions.html#type "type (Python)")\[[exc.OptionError](https://libtmux.org/en/py/latest/reference/libtmux-exc-optionerror/ "libtmux.exc.OptionError")]

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L120)] [¶](#libtmux.options.handle_option_error "Permalink to handle_option_error")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L120)] [¶](#libtmux.options.handle_option_error "Permalink to handle_option_error")

  handle\_option\_error

  Raise exception if error in option command found.

  In tmux 3.0, show-option and show-window-option return invalid option instead of unknown option. See https\://github.com/tmux/tmux/blob/3.0/cmd-show-options.c.

  In tmux >2.4, there are 3 different types of option errors:

  * unknown option
  * invalid option
  * ambiguous option

  In tmux <2.4, unknown option was the only option.

  All errors raised will have the base error of [`exc.OptionError` ](https://libtmux.org/en/py/latest/reference/libtmux-exc-optionerror/). So to catch any option error, use `except exc.OptionError`.

  Examples

  ```python
  >>> result = server.cmd(
  ...     'set-option',
  ...     'unknown-option-name',
  ... )
  ```

  ```python
  >>> bool(isinstance(result.stderr, list) and len(result.stderr))
  True
  ```

  ```python
  >>> import pytest
  >>> from libtmux import exc
  ```

  ```python
  >>> with pytest.raises(exc.OptionError):
  ...     handle_option_error(result.stderr[0])
  ```

  * Parameters

    * **error** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – Error response from subprocess call.

  * Raises

    * [exc.OptionError](https://libtmux.org/en/py/latest/reference/libtmux-exc-optionerror/ "libtmux.exc.OptionError")

    * [exc.UnknownOption](https://libtmux.org/en/py/latest/reference/libtmux-exc-unknownoption/ "libtmux.exc.UnknownOption")

    * [exc.InvalidOption](https://libtmux.org/en/py/latest/reference/libtmux-exc-invalidoption/ "libtmux.exc.InvalidOption")

    * [exc.AmbiguousOption](https://libtmux.org/en/py/latest/reference/libtmux-exc-ambiguousoption/ "libtmux.exc.AmbiguousOption")

- parse\_options\_to\_dict ( *stdout : t.IO\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*) → [UntypedOptionsDict](https://libtmux.org/en/py/latest/reference/libtmux-options-untypedoptionsdict/ "libtmux.options.UntypedOptionsDict")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L254)] [¶](#libtmux.options.parse_options_to_dict "Permalink to parse_options_to_dict")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L254)] [¶](#libtmux.options.parse_options_to_dict "Permalink to parse_options_to_dict")

  parse\_options\_to\_dict

  Process subprocess.stdout options or hook output to flat, naive, untyped dict.

  Does not explode arrays or deep values.

  Examples

  ```python
  >>> import io
  ```

  ```python
  >>> raw_options = io.StringIO("status-keys vi")
  >>> parse_options_to_dict(raw_options) == {"status-keys": "vi"}
  True
  ```

  ```python
  >>> int_options = io.StringIO("message-limit 50")
  >>> parse_options_to_dict(int_options) == {"message-limit": "50"}
  True
  ```

  ```python
  >>> empty_option = io.StringIO("user-keys")
  >>> parse_options_to_dict(empty_option) == {"user-keys": None}
  True
  ```

  ```python
  >>> array_option = io.StringIO("command-alias[0] split-pane=split-window")
  >>> parse_options_to_dict(array_option) == {
  ... "command-alias[0]": "split-pane=split-window"}
  True
  ```

  ```python
  >>> array_option = io.StringIO("command-alias[40] split-pane=split-window")
  >>> parse_options_to_dict(array_option) == {
  ... "command-alias[40]": "split-pane=split-window"}
  True
  ```

  ```python
  >>> many_options = io.StringIO(r'''status-keys
  ... command-alias[0] split-pane=split-window
  ... ''')
  >>> parse_options_to_dict(many_options) == {
  ... "command-alias[0]": "split-pane=split-window",
  ... "status-keys": None,}
  True
  ```

  ```python
  >>> many_more_options = io.StringIO(r'''
  ... terminal-features[0] xterm*:clipboard:ccolour:cstyle:focus
  ... terminal-features[1] screen*:title
  ... ''')
  >>> parse_options_to_dict(many_more_options) == {
  ... "terminal-features[0]": "xterm*:clipboard:ccolour:cstyle:focus",
  ... "terminal-features[1]": "screen*:title",}
  True
  ```

  ```python
  >>> quoted_option = io.StringIO(r'''
  ... command-alias[0] "choose-session=choose-tree -s"
  ... ''')
  >>> parse_options_to_dict(quoted_option) == {
  ... "command-alias[0]": "choose-session=choose-tree -s",
  ... }
  True
  ```

Options — Constants and variables 11 functions and constants

* \_V = t.TypeVar("\_V")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L172)] [¶](#libtmux.options._V "Permalink to _V")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L172)] [¶](#libtmux.options._V "Permalink to _V")

  \_V

- CommandAliases = dict\[str, str]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L99)] [¶](#libtmux.options.CommandAliases "Permalink to CommandAliases")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L99)] [¶](#libtmux.options.CommandAliases "Permalink to CommandAliases")

  CommandAliases

* ConvertedValue : [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias "TypeAlias (external)") = str | int | bool | None

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L173)] [¶](#libtmux.options.ConvertedValue "Permalink to ConvertedValue")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L173)] [¶](#libtmux.options.ConvertedValue "Permalink to ConvertedValue")

  ConvertedValue

- ConvertedValues : [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias "TypeAlias (external)") = ( ConvertedValue | list\[ConvertedValue] | dict\[str, ConvertedValue] | SparseArray\[ConvertedValue] )

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L174)] [¶](#libtmux.options.ConvertedValues "Permalink to ConvertedValues")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L174)] [¶](#libtmux.options.ConvertedValues "Permalink to ConvertedValues")

  ConvertedValues

* ExplodedComplexUntypedOptionsDict : [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias "TypeAlias (external)") = dict\[ str, str | int | list\[str | int] | dict\[str, list\[str | int]] | SparseArray\[str | int] | None, ]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L107)] [¶](#libtmux.options.ExplodedComplexUntypedOptionsDict "Permalink to ExplodedComplexUntypedOptionsDict")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L107)] [¶](#libtmux.options.ExplodedComplexUntypedOptionsDict "Permalink to ExplodedComplexUntypedOptionsDict")

  ExplodedComplexUntypedOptionsDict

- ExplodedUntypedOptionsDict : [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias "TypeAlias (external)") = dict\[ str, str | int | list\[str] | dict\[str, list\[str]], ]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L103)] [¶](#libtmux.options.ExplodedUntypedOptionsDict "Permalink to ExplodedUntypedOptionsDict")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L103)] [¶](#libtmux.options.ExplodedUntypedOptionsDict "Permalink to ExplodedUntypedOptionsDict")

  ExplodedUntypedOptionsDict

* OPTION\_SCOPE\_FLAG\_MAP : [dict](https://docs.python.org/3/library/stdtypes.html#dict "dict (Python)")\[[OptionScope](https://libtmux.org/en/py/latest/reference/libtmux-constants-optionscope/ "libtmux.constants.OptionScope"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] = { OptionScope.Server: "-s", OptionScope.Session: "", OptionScope.Window: "-w", OptionScope.Pane: "-p", }

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/constants.py#L73)] [¶](#libtmux.constants.OPTION_SCOPE_FLAG_MAP "Permalink to OPTION_SCOPE_FLAG_MAP")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/constants.py#L73)] [¶](#libtmux.constants.OPTION_SCOPE_FLAG_MAP "Permalink to OPTION_SCOPE_FLAG_MAP")

  OPTION\_SCOPE\_FLAG\_MAP

- OptionDict : [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias "TypeAlias (external)") = dict\[str, t.Any]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L101)] [¶](#libtmux.options.OptionDict "Permalink to OptionDict")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L101)] [¶](#libtmux.options.OptionDict "Permalink to OptionDict")

  OptionDict

* TerminalOverride = dict\[str, str | None]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L97)] [¶](#libtmux.options.TerminalOverride "Permalink to TerminalOverride")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L97)] [¶](#libtmux.options.TerminalOverride "Permalink to TerminalOverride")

  TerminalOverride

- TerminalOverrides = dict\[str, TerminalOverride]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L98)] [¶](#libtmux.options.TerminalOverrides "Permalink to TerminalOverrides")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L98)] [¶](#libtmux.options.TerminalOverrides "Permalink to TerminalOverrides")

  TerminalOverrides

* UntypedOptionsDict : [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias "TypeAlias (external)") = dict\[str, str | None]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L102)] [¶](#libtmux.options.UntypedOptionsDict "Permalink to UntypedOptionsDict")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L102)] [¶](#libtmux.options.UntypedOptionsDict "Permalink to UntypedOptionsDict")

  UntypedOptionsDict

Layout and geometry 1 type, 1 function or constant

[ResizeAdjustmentDirection 4 members](https://libtmux.org/en/py/latest/reference/libtmux-constants-resizeadjustmentdirection/)

Used for \*adjustment\* in `resize_window`, `resize_pane`.

* RESIZE\_ADJUSTMENT\_DIRECTION\_FLAG\_MAP : [dict](https://docs.python.org/3/library/stdtypes.html#dict "dict (Python)")\[[ResizeAdjustmentDirection](https://libtmux.org/en/py/latest/reference/libtmux-constants-resizeadjustmentdirection/ "libtmux.constants.ResizeAdjustmentDirection"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] = { ResizeAdjustmentDirection.Up: "-U", ResizeAdjustmentDirection.Down: "-D", ResizeAdjustmentDirection.Left: "-L", ResizeAdjustmentDirection.Right: "-R", }

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/constants.py#L17)] [¶](#libtmux.constants.RESIZE_ADJUSTMENT_DIRECTION_FLAG_MAP "Permalink to RESIZE_ADJUSTMENT_DIRECTION_FLAG_MAP")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/constants.py#L17)] [¶](#libtmux.constants.RESIZE_ADJUSTMENT_DIRECTION_FLAG_MAP "Permalink to RESIZE_ADJUSTMENT_DIRECTION_FLAG_MAP")

  RESIZE\_ADJUSTMENT\_DIRECTION\_FLAG\_MAP

Environment 1 type

[EnvironmentMixin 8 members](https://libtmux.org/en/py/latest/reference/libtmux-common-environmentmixin/)

Mixin for manager session and server level environment variables in tmux.

Versions 13 functions and constants

* \_\_version\_\_ = "0.62.0"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L7)] [¶](#libtmux.__version__ "Permalink to __version__")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L7)] [¶](#libtmux.__version__ "Permalink to __version__")

  \_\_version\_\_

- TMUX\_MAX\_VERSION = "3.7"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L32)] [¶](#libtmux.common.TMUX_MAX_VERSION "Permalink to TMUX_MAX_VERSION")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L32)] [¶](#libtmux.common.TMUX_MAX_VERSION "Permalink to TMUX_MAX_VERSION")

  TMUX\_MAX\_VERSION

* TMUX\_MIN\_VERSION = "3.2a"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L29)] [¶](#libtmux.common.TMUX_MIN_VERSION "Permalink to TMUX_MIN_VERSION")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L29)] [¶](#libtmux.common.TMUX_MIN_VERSION "Permalink to TMUX_MIN_VERSION")

  TMUX\_MIN\_VERSION

- \_no\_version\_flag\_fallback ( ) → [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L385)] [¶](#libtmux.common._no_version_flag_fallback "Permalink to _no_version_flag_fallback")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L385)] [¶](#libtmux.common._no_version_flag_fallback "Permalink to _no_version_flag_fallback")

  \_no\_version\_flag\_fallback

  Return a synthetic version string when tmux lacks `-V`.

  OpenBSD ships a `-V`-less base tmux, so assume the maximum supported version; any other platform is genuinely too old.

* get\_libtmux\_version ( ) → LooseVersion

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L677)] [¶](#libtmux.common.get_libtmux_version "Permalink to get_libtmux_version")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L677)] [¶](#libtmux.common.get_libtmux_version "Permalink to get_libtmux_version")

  get\_libtmux\_version

  Return libtmux version is a PEP386 compliant format.

  * Returns

    distutils.version.LooseVersion libtmux version

- get\_version ( *tmux\_bin : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") = None&#x20;*) → LooseVersion

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L472)] [¶](#libtmux.common.get_version "Permalink to get_version")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L472)] [¶](#libtmux.common.get_version "Permalink to get_version")

  get\_version

  Return tmux version.

  If tmux is built from git master, the version returned will be the latest version appended with -master, e.g. `2.4-master`.

  If using OpenBSD's base system tmux, the version will have `-openbsd` appended to the latest version, e.g. `2.4-openbsd`.

  * Parameters

    * **tmux\_bin** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Path to tmux binary. If \*None\*, uses the system tmux from [`shutil.which` ](https://docs.python.org/3/library/shutil.html#shutil.which).

  * Returns

    `distutils.version.LooseVersion` tmux version according to \*tmux\_bin\* if provided, otherwise the system tmux from [`shutil.which`](https://docs.python.org/3/library/shutil.html#shutil.which)

* get\_version\_str ( *tmux\_bin : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") = None&#x20;*) → [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L435)] [¶](#libtmux.common.get_version_str "Permalink to get_version_str")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L435)] [¶](#libtmux.common.get_version_str "Permalink to get_version_str")

  get\_version\_str

  Return the tmux version string verbatim, preserving letter suffixes.

  [`get_version` ](https://libtmux.org/en/py/latest/reference/libtmux-common-get_version/)normalizes point releases for numeric comparison (`"3.7a"` becomes `LooseVersion("3.7")`). This helper keeps the raw suffix, so callers can distinguish patch releases whose behavior differs -- for example the tmux 3.7 break-pane crash, reverted in 3.7a.

  Examples

  ```python
  >>> isinstance(get_version_str(), str)
  True
  ```

  * Parameters

    * **tmux\_bin** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Path to tmux binary. If \*None\*, uses the system tmux.

  * Returns

    str Raw tmux version, e.g. `"3.7a"`. Git builds return `"master"`; OpenBSD base tmux returns `"<max>-openbsd"`.

- has\_gt\_version ( *min\_version : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*, *tmux\_bin : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") = None&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L536)] [¶](#libtmux.common.has_gt_version "Permalink to has_gt_version")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L536)] [¶](#libtmux.common.has_gt_version "Permalink to has_gt_version")

  has\_gt\_version

  Return True if tmux version greater than minimum.

  * Parameters

    * **min\_version** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – tmux version, e.g. '3.2a'

    * **tmux\_bin** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Path to tmux binary. If \*None\*, uses the system tmux.

  * Returns

    bool True if version above min\_version

* has\_gte\_version ( *min\_version : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*, *tmux\_bin : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") = None&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L554)] [¶](#libtmux.common.has_gte_version "Permalink to has_gte_version")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L554)] [¶](#libtmux.common.has_gte_version "Permalink to has_gte_version")

  has\_gte\_version

  Return True if tmux version greater or equal to minimum.

  * Parameters

    * **min\_version** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – tmux version, e.g. '3.2a'

    * **tmux\_bin** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Path to tmux binary. If \*None\*, uses the system tmux.

  * Returns

    bool True if version above or equal to min\_version

- has\_lt\_version ( *max\_version : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*, *tmux\_bin : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") = None&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L590)] [¶](#libtmux.common.has_lt_version "Permalink to has_lt_version")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L590)] [¶](#libtmux.common.has_lt_version "Permalink to has_lt_version")

  has\_lt\_version

  Return True if tmux version less than minimum.

  * Parameters

    * **max\_version** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – tmux version, e.g. '3.2a'

    * **tmux\_bin** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Path to tmux binary. If \*None\*, uses the system tmux.

  * Returns

    bool True if version below max\_version

* has\_lte\_version ( *max\_version : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*, *tmux\_bin : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") = None&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L572)] [¶](#libtmux.common.has_lte_version "Permalink to has_lte_version")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L572)] [¶](#libtmux.common.has_lte_version "Permalink to has_lte_version")

  has\_lte\_version

  Return True if tmux version less or equal to minimum.

  * Parameters

    * **max\_version** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – tmux version, e.g. '3.2a'

    * **tmux\_bin** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Path to tmux binary. If \*None\*, uses the system tmux.

  * Returns

    bool True if version below or equal to max\_version

- has\_minimum\_version ( *raises : [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)") = True&#x20;*, *tmux\_bin : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") = None&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L608)] [¶](#libtmux.common.has_minimum_version "Permalink to has_minimum_version")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L608)] [¶](#libtmux.common.has_minimum_version "Permalink to has_minimum_version")

  has\_minimum\_version

  Return True if tmux meets version requirement. Version >= 3.2a.

  * Parameters

    * **raises** ( [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)") ) – raise exception if below minimum version requirement

    * **tmux\_bin** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Path to tmux binary. If \*None\*, uses the system tmux.

  * Returns

    bool True if tmux meets minimum required version.

  * Raises

    * [libtmux.exc.VersionTooLow](https://libtmux.org/en/py/latest/reference/libtmux-exc-versiontoolow/ "libtmux.exc.VersionTooLow") – tmux version below minimum required for libtmux

* has\_version ( *version : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*, *tmux\_bin : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") = None&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L518)] [¶](#libtmux.common.has_version "Permalink to has_version")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L518)] [¶](#libtmux.common.has_version "Permalink to has_version")

  has\_version

  Return True if tmux version installed.

  * Parameters

    * **version** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – version number, e.g. '3.2a'

    * **tmux\_bin** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Path to tmux binary. If \*None\*, uses the system tmux.

  * Returns

    bool True if version matches

Commands 3 types

[CmdProtocol 1 members](https://libtmux.org/en/py/latest/reference/libtmux-common-cmdprotocol/)

Command protocol for tmux command.

[CmdMixin 1 members](https://libtmux.org/en/py/latest/reference/libtmux-common-cmdmixin/)

Command mixin for tmux command.

[tmux\_cmd 1 members](https://libtmux.org/en/py/latest/reference/libtmux-common-tmux_cmd/)

Run any tmux(1) command through subprocess.

Formats 2 types, 21 functions and constants

[LogFormatter 3 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-log-logformatter/)

Format logs for tmuxp.

[DebugLogFormatter 3 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-log-debuglogformatter/)

Provides greater technical details than standard log Formatter.

* \_CONTEXT\_ONLY\_TOKENS : [frozenset](https://docs.python.org/3/library/stdtypes.html#frozenset "frozenset (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] = frozenset( { "command\_list\_alias", "command\_list\_name", "command\_list\_usage", "current\_file", "search\_match", } )

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L169)] [¶](#libtmux.neo._CONTEXT_ONLY_TOKENS "Permalink to _CONTEXT_ONLY_TOKENS")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L169)] [¶](#libtmux.neo._CONTEXT_ONLY_TOKENS "Permalink to _CONTEXT_ONLY_TOKENS")

  \_CONTEXT\_ONLY\_TOKENS

- \_SCOPE\_OVERRIDES : [dict](https://docs.python.org/3/library/stdtypes.html#dict "dict (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] = { "cursor\_x": "pane", # ft->wp->base.cx "cursor\_y": "pane", # ft->wp->base.cy "cursor\_flag": "pane", # ft->wp->base.mode "cursor\_character": "pane", # ft->wp "mouse\_all\_flag": "pane", # ft->wp->base.mode MODE\_MOUSE\_ALL "mouse\_any\_flag": "pane", # ft->wp->base.mode ALL\_MOUSE\_MODES "mouse\_button\_flag": "pane", # ft->wp->base.mode MODE\_MOUSE\_BUTTON "mouse\_sgr\_flag": "pane", # ft->wp->base.mode MODE\_MOUSE\_SGR "mouse\_standard\_flag": "pane", # ft->wp->base.mode MODE\_MOUSE\_STANDARD "scroll\_region\_lower": "pane", # ft->wp->base.rlower "scroll\_region\_upper": "pane", # ft->wp->base.rupper "alternate\_saved\_x": "pane", # ft->wp->base.saved\_cx "alternate\_saved\_y": "pane", # ft->wp->base.saved\_cy "history\_bytes": "pane", # ft->wp "history\_limit": "pane", # ft->wp->base.grid->hlimit "history\_size": "pane", # ft->wp->base.grid->hsize "insert\_flag": "pane", # ft->wp->base.mode MODE\_INSERT "keypad\_cursor\_flag": "pane", # ft->wp->base.mode MODE\_KCURSOR "keypad\_flag": "pane", # ft->wp->base.mode MODE\_KKEYPAD "origin\_flag": "pane", # ft->wp->base.mode MODE\_ORIGIN "wrap\_flag": "pane", # ft->wp->base.mode MODE\_WRAP "active\_window\_index": "session", # ft->s->curw->idx "last\_window\_index": "session", # ft->s # tmux 3.7 pane-scope tokens that don't carry the pane\_ prefix. "bracket\_paste\_flag": "pane", # ft->wp->screen->mode MODE\_BRACKETPASTE "synchronized\_output\_flag": "pane", # ft->wp->base.mode MODE\_SYNC }

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L100)] [¶](#libtmux.neo._SCOPE_OVERRIDES "Permalink to _SCOPE_OVERRIDES")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L100)] [¶](#libtmux.neo._SCOPE_OVERRIDES "Permalink to _SCOPE_OVERRIDES")

  \_SCOPE\_OVERRIDES

* \_SCOPE\_PREFIXES : [tuple](https://docs.python.org/3/library/stdtypes.html#tuple "tuple (Python)")\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "tuple (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")], ...] = ( ("copy\_cursor\_", "event"), ("pane\_", "pane"), ("window\_", "window"), ("session\_", "session"), ("client\_", "client"), ("buffer\_", "buffer"), ("mouse\_", "event"), ("cursor\_", "event"), ("selection\_", "event"), ("scroll\_", "event"), ("popup\_", "event"), )

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L81)] [¶](#libtmux.neo._SCOPE_PREFIXES "Permalink to _SCOPE_PREFIXES")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L81)] [¶](#libtmux.neo._SCOPE_PREFIXES "Permalink to _SCOPE_PREFIXES")

  \_SCOPE\_PREFIXES

- \_UNIVERSAL\_TOKENS : [frozenset](https://docs.python.org/3/library/stdtypes.html#frozenset "frozenset (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] = frozenset( { "config\_files", "host", "host\_short", "line", "next\_session\_id", "pid", "socket\_path", "start\_time", "uid", "user", "version", } )

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L138)] [¶](#libtmux.neo._UNIVERSAL_TOKENS "Permalink to _UNIVERSAL_TOKENS")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L138)] [¶](#libtmux.neo._UNIVERSAL_TOKENS "Permalink to _UNIVERSAL_TOKENS")

  \_UNIVERSAL\_TOKENS

* CLIENT\_FORMATS = \[ "client\_cwd", "client\_height", "client\_width", "client\_tty", "client\_termname", "client\_created", "client\_created\_string", "client\_activity", "client\_activity\_string", "client\_prefix", "client\_utf8", "client\_readonly", "client\_session", "client\_last\_session", ]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/formats.py#L36)] [¶](#libtmux.formats.CLIENT_FORMATS "Permalink to CLIENT_FORMATS")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/formats.py#L36)] [¶](#libtmux.formats.CLIENT_FORMATS "Permalink to CLIENT_FORMATS")

  CLIENT\_FORMATS

- FIELD\_VERSION : [dict](https://docs.python.org/3/library/stdtypes.html#dict "dict (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] = { # Post-3.2a additions (verified against tmux's format.c at each gated # release tag, e.g. https\://github.com/tmux/tmux/blob/3.6a/format.c). "pane\_dead\_signal": "3.3", "pane\_dead\_time": "3.3", # tmux 3.7 additions (verified against format.c / tmux.1 at the 3.7 tag). "bracket\_paste\_flag": "3.7", "pane\_flags": "3.7", "pane\_floating\_flag": "3.7", "pane\_pb\_progress": "3.7", "pane\_pb\_state": "3.7", "pane\_pipe\_pid": "3.7", "pane\_x": "3.7", "pane\_y": "3.7", "pane\_z": "3.7", "pane\_zoomed\_flag": "3.7", "synchronized\_output\_flag": "3.7", }

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L51)] [¶](#libtmux.neo.FIELD_VERSION "Permalink to FIELD_VERSION")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L51)] [¶](#libtmux.neo.FIELD_VERSION "Permalink to FIELD_VERSION")

  FIELD\_VERSION

  Minimum tmux version that registers each format token.

  Field names absent from this dict default to `"3.2a"` (always-safe within the supported tmux range). Entries here represent tokens added after 3.2a that need explicit gating to keep the `-F` template compatible with older tmux versions.

* FORMAT\_SEPARATOR = os.environ.get("LIBTMUX\_TMUX\_FORMAT\_SEPARATOR", "␞")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/formats.py#L21)] [¶](#libtmux.formats.FORMAT_SEPARATOR "Permalink to FORMAT_SEPARATOR")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/formats.py#L21)] [¶](#libtmux.formats.FORMAT_SEPARATOR "Permalink to FORMAT_SEPARATOR")

  FORMAT\_SEPARATOR

- OutputRaw = dict\[str, t.Any]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L26)] [¶](#libtmux.neo.OutputRaw "Permalink to OutputRaw")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L26)] [¶](#libtmux.neo.OutputRaw "Permalink to OutputRaw")

  OutputRaw

* OutputsRaw = list\[OutputRaw]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L27)] [¶](#libtmux.neo.OutputsRaw "Permalink to OutputsRaw")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L27)] [¶](#libtmux.neo.OutputsRaw "Permalink to OutputsRaw")

  OutputsRaw

- PANE\_FORMATS = \[ "history\_size", "history\_limit", "history\_bytes", "pane\_index", "pane\_width", "pane\_height", "pane\_title", "pane\_id", "pane\_active", "pane\_dead", "pane\_in\_mode", "pane\_synchronized", "pane\_tty", "pane\_pid", "pane\_start\_command", "pane\_start\_path", "pane\_current\_path", "pane\_current\_command", "cursor\_x", "cursor\_y", "scroll\_region\_upper", "scroll\_region\_lower", "saved\_cursor\_x", "saved\_cursor\_y", "alternate\_on", "alternate\_saved\_x", "alternate\_saved\_y", "cursor\_flag", "insert\_flag", "keypad\_cursor\_flag", "keypad\_flag", "wrap\_flag", "mouse\_standard\_flag", "mouse\_button\_flag", "mouse\_any\_flag", "mouse\_utf8\_flag", # tmux 3.7 "pane\_flags", "pane\_floating\_flag", "pane\_x", "pane\_y", "pane\_z", "pane\_zoomed\_flag", "pane\_pb\_progress", "pane\_pb\_state", "pane\_pipe\_pid", "bracket\_paste\_flag", "synchronized\_output\_flag", ]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/formats.py#L70)] [¶](#libtmux.formats.PANE_FORMATS "Permalink to PANE_FORMATS")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/formats.py#L70)] [¶](#libtmux.formats.PANE_FORMATS "Permalink to PANE_FORMATS")

  PANE\_FORMATS

* SCOPES\_BY\_LIST\_CMD : [dict](https://docs.python.org/3/library/stdtypes.html#dict "dict (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [frozenset](https://docs.python.org/3/library/stdtypes.html#frozenset "frozenset (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]] = { "list-sessions": frozenset({"universal", "session", "window", "pane"}), "list-windows": frozenset({"universal", "session", "window", "pane"}), "list-panes": frozenset({"universal", "session", "window", "pane"}), "list-clients": frozenset({"universal", "session", "window", "pane", "client"}), }

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L30)] [¶](#libtmux.neo.SCOPES_BY_LIST_CMD "Permalink to SCOPES_BY_LIST_CMD")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L30)] [¶](#libtmux.neo.SCOPES_BY_LIST_CMD "Permalink to SCOPES_BY_LIST_CMD")

  SCOPES\_BY\_LIST\_CMD

  Format-token scopes a given tmux `list-*` subcommand can resolve.

  A token whose scope is in the set is safe to include in that subcommand's `-F` template. A token whose scope is \*outside\* the set may be unavailable for that command, so libtmux leaves it out.

  The relationship is asymmetric: when tmux lists a parent object, it can also report fields for that parent's active child. A session row can include its current window and active pane fields, and a client row can include the attached session, current window, and active pane. `client` scope is the exception in the other direction: it appears only in `list-clients` because session/window/pane listings do not have a client attachment to report.

- SESSION\_FORMATS = \[ "session\_name", "session\_windows", "session\_width", "session\_height", "session\_id", "session\_created", "session\_created\_string", "session\_attached", # "session\_grouped", Apparently unused in tmux. "session\_group", ]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/formats.py#L23)] [¶](#libtmux.formats.SESSION_FORMATS "Permalink to SESSION_FORMATS")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/formats.py#L23)] [¶](#libtmux.formats.SESSION_FORMATS "Permalink to SESSION_FORMATS")

  SESSION\_FORMATS

* WINDOW\_FORMATS = \[ # format\_window() "window\_id", "window\_name", "window\_width", "window\_height", "window\_layout", "window\_panes", # format\_winlink() "window\_index", "window\_flags", "window\_active", "window\_bell\_flag", "window\_activity\_flag", "window\_silence\_flag", ]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/formats.py#L53)] [¶](#libtmux.formats.WINDOW_FORMATS "Permalink to WINDOW_FORMATS")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/formats.py#L53)] [¶](#libtmux.formats.WINDOW_FORMATS "Permalink to WINDOW_FORMATS")

  WINDOW\_FORMATS

- \_best\_winlink ( *rows : [OutputsRaw](https://libtmux.org/en/py/latest/reference/libtmux-neo-outputsraw/ "libtmux.neo.OutputsRaw")&#x20;*) → [OutputRaw](https://libtmux.org/en/py/latest/reference/libtmux-neo-outputraw/ "libtmux.neo.OutputRaw")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L1204)] [¶](#libtmux.neo._best_winlink "Permalink to _best_winlink")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L1204)] [¶](#libtmux.neo._best_winlink "Permalink to _best_winlink")

  \_best\_winlink

  Pick the winlink row tmux would select.

  A `list-windows` listing enumerates winlinks -- `(session, index, window)` edges -- not windows. `link-window` can attach one window to a session at several indexes at once, so the same `window_id` may appear on several rows, each with a different `window_index`.

  tmux selects the current winlink when it contains the window, otherwise the first. `#{window_active}` identifies the current row, and the lowest `window_index` is tmux's first -- chosen explicitly here, so the caller need not pre-sort the rows.

  Examples

  One row is the whole answer:

  ```python
  >>> from libtmux.neo import _best_winlink
  >>> _best_winlink([{"window_id": "@0", "window_index": "1"}])["window_index"]
  '1'
  ```

  A window linked into one session twice gives two rows. When the session is sitting on the higher-indexed link, that is the one tmux acts on:

  ```python
  >>> _best_winlink([
  ...     {"window_id": "@0", "window_index": "1", "window_active": "0"},
  ...     {"window_id": "@0", "window_index": "5", "window_active": "1"},
  ... ])["window_index"]
  '5'
  ```

  When the session is sitting on some \*other\* window, neither link is current, and tmux falls back to the first:

  ```python
  >>> _best_winlink([
  ...     {"window_id": "@0", "window_index": "1", "window_active": "0"},
  ...     {"window_id": "@0", "window_index": "5", "window_active": "0"},
  ... ])["window_index"]
  '1'
  ```

  The fallback reads the lowest index, not the first row, so a listing that happened to arrive high-index-first still answers tmux's first:

  ```python
  >>> _best_winlink([
  ...     {"window_id": "@0", "window_index": "5", "window_active": "0"},
  ...     {"window_id": "@0", "window_index": "1", "window_active": "0"},
  ... ])["window_index"]
  '1'
  ```

  * Parameters

    * **rows** ( [OutputsRaw](https://libtmux.org/en/py/latest/reference/libtmux-neo-outputsraw/ "libtmux.neo.OutputsRaw") ) – Non-empty rows for one object id in one session. Order does not matter: the current winlink wins, otherwise the lowest `window_index`.

  * Returns

    OutputRaw The row naming the winlink tmux would act on.

* \_is\_target\_not\_found\_error ( *stderr\_text : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L1157)] [¶](#libtmux.neo._is_target_not_found_error "Permalink to _is_target_not_found_error")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L1157)] [¶](#libtmux.neo._is_target_not_found_error "Permalink to _is_target_not_found_error")

  \_is\_target\_not\_found\_error

  Return True if tmux failed because the `-t` target does not exist.

  A live tmux server rejects an unknown target with `can't find <kind>: <target>` on stderr (`cmd_find_target` in tmux's `cmd-find.c`), for every object kind and every supported tmux version. Every \*other\* failure -- a stopped daemon, a missing socket, a permission error -- says something else, and stays a [`LibTmuxException` ](https://libtmux.org/en/py/latest/reference/libtmux-exc-libtmuxexception/).

  This is the mirror image of [`libtmux.server._is_daemon_not_up_error` ](https://libtmux.org/en/py/latest/reference/libtmux-server-_is_daemon_not_up_error/): together they answer "is the object gone, or is the server gone?" from the same stderr text.

  Examples

  ```python
  >>> from libtmux.neo import _is_target_not_found_error
  >>> _is_target_not_found_error("can't find pane: %99")
  True
  >>> _is_target_not_found_error("can't find window: @99")
  True
  >>> _is_target_not_found_error("can't find session: $99")
  True
  ```

  A server that isn't there is a different answer:

  ```python
  >>> _is_target_not_found_error("no server running on /tmp/tmux-1000/default")
  False
  >>> _is_target_not_found_error(
  ...     "error connecting to /tmp/tmux-1000/nope (No such file or directory)"
  ... )
  False
  ```

  * Parameters

    * **stderr\_text** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – tmux's stderr, as carried by the raised [`LibTmuxException` ](https://libtmux.org/en/py/latest/reference/libtmux-exc-libtmuxexception/).

  * Returns

    bool True when the object named by `-t` does not exist on a reachable server.

- \_normalize\_tmux\_version ( *version : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*) → LooseVersion

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L264)] [¶](#libtmux.neo._normalize_tmux_version "Permalink to _normalize_tmux_version")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L264)] [¶](#libtmux.neo._normalize_tmux_version "Permalink to _normalize_tmux_version")

  \_normalize\_tmux\_version

  Convert a tmux version string into a comparable `LooseVersion`.

  tmux master is reported as `"master"` (or e.g. `"3.6a-master"`); treat it as larger than any tagged release.

  Examples

  ```python
  >>> from libtmux.neo import _normalize_tmux_version
  >>> _normalize_tmux_version("3.6a") < _normalize_tmux_version("master")
  True
  >>> _normalize_tmux_version("3.2a") < _normalize_tmux_version("3.6a")
  True
  ```

* \_token\_scope ( *field\_name : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*) → [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L180)] [¶](#libtmux.neo._token_scope "Permalink to _token_scope")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L180)] [¶](#libtmux.neo._token_scope "Permalink to _token_scope")

  \_token\_scope

  Resolve a format token's scope from its name.

  Returns `"universal"` for cross-scope tokens (e.g. `version`, `socket_path`, `host`). Returns `"event"` for runtime-only tokens that never appear in a `list-*` output (mouse, cursor, selection, popup). Returns `"context"` for tokens registered outside `format.c`'s static table (only resolve in a specific command or mode context). Returns `"pane"` / `"window"` / `"session"` / `"client"` / `"buffer"` for scope-prefixed tokens.

  Fields that don't match any prefix, override, or known-token table fall back to `"unknown"`. `"unknown"` is intentionally absent from every [`SCOPES_BY_LIST_CMD` ](https://libtmux.org/en/py/latest/reference/libtmux-neo-scopes_by_list_cmd/)entry, so an unclassified field is excluded from every `list-*` `-F` template — preventing a future untracked field from being silently emitted under a list command where it might crash older tmux. Add such a field to [`_SCOPE_OVERRIDES` ](https://libtmux.org/en/py/latest/reference/libtmux-neo-_scope_overrides/)(or the appropriate prefix / known-token table) to admit it.

  Examples

  ```python
  >>> from libtmux.neo import _token_scope
  >>> _token_scope("pane_id")
  'pane'
  >>> _token_scope("window_zoomed_flag")
  'window'
  >>> _token_scope("client_name")
  'client'
  >>> _token_scope("version")
  'universal'
  >>> _token_scope("mouse_x")
  'event'
  ```

  Tokens whose name doesn't carry a scope prefix can still be scope-gated via [`_SCOPE_OVERRIDES` ](https://libtmux.org/en/py/latest/reference/libtmux-neo-_scope_overrides/)(verified against tmux's `format_cb_*`). The override also corrects prefix-misclassified tokens — e.g. `mouse_all_flag` is a per-pane mode bit, not a runtime mouse event:

  ```python
  >>> _token_scope("mouse_all_flag")
  'pane'
  >>> _token_scope("active_window_index")
  'session'
  ```

  Context-only tokens (registered outside `format.c`'s static table) route to the `"context"` scope and are excluded from every `list-*` `-F` template:

  ```python
  >>> _token_scope("command_list_alias")
  'context'
  >>> _token_scope("search_match")
  'context'
  ```

  Unclassified tokens fall back to `"unknown"`, also excluded from every list command:

  ```python
  >>> _token_scope("libtmux_test_nonexistent_token")
  'unknown'
  ```

- fetch\_obj ( *server : [Server](https://libtmux.org/en/py/latest/reference/libtmux-server/ "libtmux.Server")&#x20;*, *obj\_key : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*, *obj\_id : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*, *list\_cmd : ListCmd = "list-panes"&#x20;*, *list\_extra\_args : ListExtraArgs = None&#x20;*) → [OutputRaw](https://libtmux.org/en/py/latest/reference/libtmux-neo-outputraw/ "libtmux.neo.OutputRaw")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L1275)] [¶](#libtmux.neo.fetch_obj "Permalink to fetch_obj")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L1275)] [¶](#libtmux.neo.fetch_obj "Permalink to fetch_obj")

  fetch\_obj

  Fetch the single `list-*` row whose \*obj\_key\* equals \*obj\_id\*.

  A listing enumerates winlinks, so a window linked into one session at two indexes matches twice. [`_best_winlink` ](https://libtmux.org/en/py/latest/reference/libtmux-neo-_best_winlink/)then picks the row tmux itself would act on, rather than whichever sorted last.

  Examples

  ```python
  >>> from libtmux.neo import fetch_obj
  >>> fetch_obj(
  ...     server=pane.server,
  ...     obj_key="pane_id",
  ...     obj_id=pane.pane_id,
  ...     list_cmd="list-panes",
  ...     list_extra_args=("-t", pane.pane_id),
  ... )["pane_id"] == pane.pane_id
  True
  ```

  A pane that does not exist on a live server is a [`TmuxObjectDoesNotExist` ](https://libtmux.org/en/py/latest/reference/libtmux-exc-tmuxobjectdoesnotexist/), not a bare tmux error:

  ```python
  >>> from libtmux import exc
  >>> try:
  ...     fetch_obj(
  ...         server=pane.server,
  ...         obj_key="pane_id",
  ...         obj_id="%99999",
  ...         list_cmd="list-panes",
  ...         list_extra_args=("-t", "%99999"),
  ...     )
  ... except exc.TmuxObjectDoesNotExist as e:
  ...     print(e)
  Could not find pane_id=%99999 for list-panes ('-t', '%99999')
  ```

  * Parameters

    * **server** ( [Server](https://libtmux.org/en/py/latest/reference/libtmux-server/ "libtmux.Server") ) – The tmux server to query.

    * **obj\_key** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – Identity field to match, e.g. `"pane_id"`.

    * **obj\_id** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – Value the identity field must equal, e.g. `"%3"`.

    * **list\_cmd** ( ListCmd ) – tmux list subcommand to run.

    * **list\_extra\_args** ( ListExtraArgs ) – Extra arguments appended verbatim to the tmux command, e.g. `("-t", "%3")` to scope the listing to one object's parent.

  * Returns

    OutputRaw The matching row, as a dict of tmux format fields.

  * Raises

    * [TmuxObjectDoesNotExist](https://libtmux.org/en/py/latest/reference/libtmux-exc-tmuxobjectdoesnotexist/ "libtmux.exc.TmuxObjectDoesNotExist") – When the object does not exist -- whether tmux said so on stderr (`can't find pane: %99`, for a `-t`-scoped listing) or the object simply never appeared in the rows.

    * [LibTmuxException](https://libtmux.org/en/py/latest/reference/libtmux-exc-libtmuxexception/ "libtmux.exc.LibTmuxException") – For every other tmux failure, notably an unreachable server.

* fetch\_objs ( *server : [Server](https://libtmux.org/en/py/latest/reference/libtmux-server/ "libtmux.Server")&#x20;*, *list\_cmd : ListCmd&#x20;*, *list\_extra\_args : ListExtraArgs = None&#x20;*, *filter : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") = None&#x20;*, *# noqa: A002&#x20;*) → [OutputsRaw](https://libtmux.org/en/py/latest/reference/libtmux-neo-outputsraw/ "libtmux.neo.OutputsRaw")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L1039)] [¶](#libtmux.neo.fetch_objs "Permalink to fetch_objs")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L1039)] [¶](#libtmux.neo.fetch_objs "Permalink to fetch_objs")

  fetch\_objs

  Fetch a listing of raw data from a tmux command.

  Runs a tmux list command (e.g. `list-sessions`) with the format string from [`get_output_format` ](https://libtmux.org/en/py/latest/reference/libtmux-neo-get_output_format/)and parses each line of output into a dict.

  Examples

  ```python
  >>> from libtmux.neo import fetch_objs
  >>> objs = fetch_objs(server=server, list_cmd="list-sessions")
  >>> isinstance(objs, list)
  True
  >>> isinstance(objs[0], dict)
  True
  >>> 'session_id' in objs[0]
  True
  ```

  * Parameters

    * **server** ( [Server](https://libtmux.org/en/py/latest/reference/libtmux-server/ "libtmux.Server") ) – The tmux server to query.

    * **list\_cmd** ( ListCmd ) – The tmux list command to run, e.g. `"list-sessions"`, `"list-windows"`, or `"list-panes"`.

    * **list\_extra\_args** ( ListExtraArgs ) – Extra arguments appended to the tmux command (e.g. `("-a",)` for all windows/panes, or `["-t", session_id]` to filter).

    * **filter** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Filter expression evaluated by tmux (`-f` flag). tmux omits rows whose expanded expression is false before libtmux parses the result. tmux silently expands a malformed filter (unclosed `#{...}`, unknown format token) to empty, which is treated as false — every row is suppressed and no stderr is emitted. A bad filter is indistinguishable from "filter matched nothing"; verify the expression against the FORMATS section of `tmux(1)`. See native-filtering for the typed wrappers that share this caveat. Warning: added 0.57

  * Returns

    OutputsRaw A list of dicts, each mapping tmux format field names to their non-empty string values.

  * Raises

    * [LibTmuxException](https://libtmux.org/en/py/latest/reference/libtmux-exc-libtmuxexception/ "libtmux.exc.LibTmuxException") – If the tmux command writes to stderr.

- get\_output\_format ( *list\_cmd : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") = "list-panes"&#x20;*, *tmux\_version : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") = "3.2a"&#x20;*) → [tuple](https://docs.python.org/3/library/stdtypes.html#tuple "tuple (Python)")\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "tuple (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), ...], [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L909)] [¶](#libtmux.neo.get_output_format "Permalink to get_output_format")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L909)] [¶](#libtmux.neo.get_output_format "Permalink to get_output_format")

  get\_output\_format

  Return field names and tmux format string filtered by scope and version.

  Only emits tokens whose scope is reachable from \*list\_cmd\* (per [`SCOPES_BY_LIST_CMD` ](https://libtmux.org/en/py/latest/reference/libtmux-neo-scopes_by_list_cmd/)) and whose minimum tmux version (per [`FIELD_VERSION` ](https://libtmux.org/en/py/latest/reference/libtmux-neo-field_version/)) is at or below \*tmux\_version\*. Runtime-only tokens (`mouse_*`, `cursor_*`, popups) are excluded from every `list-*` template — they only resolve in event-time format contexts.

  Examples

  ```python
  >>> from libtmux.neo import get_output_format
  >>> fields, fmt = get_output_format("list-sessions", "3.6a")
  >>> 'session_id' in fields
  True
  >>> 'pane_id' in fields  # active pane for the listed session
  True
  >>> 'client_name' in fields  # upward not allowed
  False
  >>> 'server' in fields
  False
  ```

  Pane scope picks up window and session tokens too:

  ```python
  >>> fields, _ = get_output_format("list-panes", "3.6a")
  >>> all(t in fields for t in ('pane_id', 'window_id', 'session_id'))
  True
  ```

  `list-clients` adds fields for the attached client:

  ```python
  >>> fields, _ = get_output_format("list-clients", "3.6a")
  >>> 'client_name' in fields
  True
  >>> 'pane_id' in fields
  True
  ```

  * Parameters

    * **list\_cmd** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – The tmux list subcommand the format string is being built for. Determines which token scopes are reachable.

    * **tmux\_version** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – The live tmux version. Used to gate post-3.2a tokens. Defaults to `"3.2a"` (the project's minimum) for safe fallback when the caller can't yet detect the version.

  * Returns

    tuple\[tuple\[str, ...], str] A tuple of (field\_names, tmux\_format\_string) restricted to tokens the given \*list\_cmd\* and \*tmux\_version\* can resolve.

* parse\_output ( *output : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*, *list\_cmd : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") = "list-panes"&#x20;*, *tmux\_version : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") = "3.2a"&#x20;*) → [OutputRaw](https://libtmux.org/en/py/latest/reference/libtmux-neo-outputraw/ "libtmux.neo.OutputRaw")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L985)] [¶](#libtmux.neo.parse_output "Permalink to parse_output")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L985)] [¶](#libtmux.neo.parse_output "Permalink to parse_output")

  parse\_output

  Parse a tmux `-F` line into a dict keyed by Obj field name.

  The (\*list\_cmd\*, \*tmux\_version\*) pair must match what was passed to [`get_output_format` ](https://libtmux.org/en/py/latest/reference/libtmux-neo-get_output_format/)when the `-F` template was built — otherwise the field order won't line up with the split values.

  Examples

  ```python
  >>> from libtmux.neo import get_output_format, parse_output
  >>> from libtmux.formats import FORMAT_SEPARATOR
  >>> fields, fmt = get_output_format("list-sessions", "3.6a")
  >>> values = [''] * len(fields)
  >>> values[fields.index('session_id')] = '$1'
  >>> result = parse_output(
  ...     FORMAT_SEPARATOR.join(values) + FORMAT_SEPARATOR,
  ...     list_cmd="list-sessions",
  ...     tmux_version="3.6a",
  ... )
  >>> result['session_id']
  '$1'
  >>> 'pane_id' in result
  False
  ```

  * Parameters

    * **output** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – Raw tmux output line produced with a template from [`get_output_format` ](https://libtmux.org/en/py/latest/reference/libtmux-neo-get_output_format/).

    * **list\_cmd** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – Same value passed to [`get_output_format` ](https://libtmux.org/en/py/latest/reference/libtmux-neo-get_output_format/).

    * **tmux\_version** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – Same value passed to [`get_output_format` ](https://libtmux.org/en/py/latest/reference/libtmux-neo-get_output_format/).

  * Returns

    OutputRaw A dict mapping field names to non-empty string values.

Queries 1 function or constant

* \_query\_version ( *tmux\_bin : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") = None&#x20;*) → [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L400)] [¶](#libtmux.common._query_version "Permalink to _query_version")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L400)] [¶](#libtmux.common._query_version "Permalink to _query_version")

  \_query\_version

  Return the raw `tmux -V` version token, letter suffix intact.

  Runs `tmux -V` and extracts the version token (e.g. `"3.7a"`, `"master"`, `"next-3.8"`). Not memoized -- [`get_version` ](https://libtmux.org/en/py/latest/reference/libtmux-common-get_version/)and [`get_version_str` ](https://libtmux.org/en/py/latest/reference/libtmux-common-get_version_str/)each cache their own result on top of this query.

  * Parameters

    * **tmux\_bin** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Path to tmux binary. If \*None\*, uses the system tmux.

  * Returns

    str Raw version token from `tmux -V`.

  * Raises

    * [\_TmuxVersionUnavailable](https://libtmux.org/en/py/latest/reference/libtmux-common-_tmuxversionunavailable/ "libtmux.common._TmuxVersionUnavailable") – tmux predates the `-V` flag; callers apply [`_no_version_flag_fallback` ](https://libtmux.org/en/py/latest/reference/libtmux-common-_no_version_flag_fallback/).

    * [VersionTooLow](https://libtmux.org/en/py/latest/reference/libtmux-exc-versiontoolow/ "libtmux.exc.VersionTooLow") – tmux reported another error on `-V`.

Errors 34 types, 2 functions and constants

[\_TmuxVersionUnavailable 0 members](https://libtmux.org/en/py/latest/reference/libtmux-common-_tmuxversionunavailable/)

Internal signal: this tmux predates the `-V` flag (pre-1.7).

[LibTmuxException 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-libtmuxexception/)

Base Exception for libtmux Errors.

[DeprecatedError 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-deprecatederror/)

Raised when a deprecated function, method, or parameter is used.

[TmuxCommandNotFound 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-tmuxcommandnotfound/)

Application binary for tmux not found.

[NotInsideTmux 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-notinsidetmux/)

Raised when the process is not running inside a tmux pane.

[ObjectDoesNotExist 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-objectdoesnotexist/)

A lookup expected one object and matched none.

[MultipleObjectsReturned 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-multipleobjectsreturned/)

A lookup expected one object and matched several.

[TmuxObjectDoesNotExist 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-tmuxobjectdoesnotexist/)

tmux has no object with the id that was asked for.

[VersionTooLow 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-versiontoolow/)

Raised if tmux below the minimum version to use libtmux.

[OptionError 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-optionerror/)

Root error for any error involving invalid, ambiguous or bad options.

[UnknownOption 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-unknownoption/)

Option unknown to tmux show-option(s) or show-window-option(s).

[UnknownColorOption 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-unknowncoloroption/)

Unknown color option.

[InvalidOption 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-invalidoption/)

Option invalid to tmux.

[AmbiguousOption 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-ambiguousoption/)

Option that could potentially match more than one.

[WaitTimeout 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-waittimeout/)

Function timed out without meeting condition.

[VariableUnpackingError 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-variableunpackingerror/)

Error unpacking variable.

[AdjustmentDirectionRequiresAdjustment 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-adjustmentdirectionrequiresadjustment/)

If \*adjustment\_direction\* is set, \*adjustment\* must be set.

[RequiresDigitOrPercentage 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-requiresdigitorpercentage/)

Requires digit (int or str digit) or a percentage.

[ConvertUnknownFileType 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-convert-convertunknownfiletype/)

Raise if tmuxp convert encounters an unknown filetype.

[InvalidFieldError 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-invalidfielderror/)

Raised when an invalid field name is specified.

[TmuxpException 0 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-tmuxpexception/)

Base Exception for Tmuxp Errors.

[WorkspaceError 0 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-workspaceerror/)

Error parsing tmuxp workspace data.

[EmptyWorkspaceException 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-emptyworkspaceexception/)

Workspace file is empty.

[WorkspaceBuilderError 0 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-workspacebuildererror/)

Base error for resolving and validating a workspace builder.

[WorkspaceBuilderNotFound 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-workspacebuildernotfound/)

Configured `workspace_builder` could not be resolved.

[WorkspaceBuilderImportError 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-workspacebuilderimporterror/)

Configured `workspace_builder` failed to import.

[InvalidWorkspaceBuilder 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-invalidworkspacebuilder/)

Resolved `workspace_builder` object is not a usable builder.

[WorkspaceBuilderPathError 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-workspacebuilderpatherror/)

A `workspace_builder_paths` entry is not a usable directory.

[InvalidWorkspaceBuilderOption 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-invalidworkspacebuilderoption/)

A `workspace_builder_options` value is invalid.

[TmuxpPluginException 0 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-tmuxppluginexception/)

Base Exception for Tmuxp Errors.

[BeforeLoadScriptNotExists 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-beforeloadscriptnotexists/)

Raises if shell script could not be found.

[BeforeLoadScriptError 2 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-beforeloadscripterror/)

Shell script execution error.

[SchemaValidationError 0 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-validation-schemavalidationerror/)

Tmuxp configuration validation base error.

[InvalidPluginsValidationError 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-validation-invalidpluginsvalidationerror/)

Tmuxp configuration error for invalid plugins.

* \_format\_query ( *query : [t.Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "t.Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [t.Any](https://docs.python.org/3/library/typing.html#typing.Any "t.Any (Python)")]&#x20;*) → [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/exc.py#L16)] [¶](#libtmux.exc._format_query "Permalink to _format_query")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/exc.py#L16)] [¶](#libtmux.exc._format_query "Permalink to _format_query")

  \_format\_query

  Render a [`QueryList.get` ](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-querylist-get/)lookup back as `key=value` text.

  Examples

  ```python
  >>> from libtmux.exc import _format_query
  >>> _format_query({"pane_id": "%0"})
  "pane_id='%0'"
  ```

  ```python
  >>> _format_query({"window_name": "shared", "window_index": "1"})
  "window_name='shared', window_index='1'"
  ```

  ```python
  >>> _format_query({})
  ''
  ```

- raise\_if\_stderr ( *proc : [tmux\_cmd](https://libtmux.org/en/py/latest/reference/libtmux-common-tmux_cmd/ "libtmux.common.tmux_cmd")&#x20;*, *subcommand : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*) → [None](https://docs.python.org/3/library/constants.html#None "None (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L245)] [¶](#libtmux.common.raise_if_stderr "Permalink to raise_if_stderr")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L245)] [¶](#libtmux.common.raise_if_stderr "Permalink to raise_if_stderr")

  raise\_if\_stderr

  Raise [`LibTmuxException` ](https://libtmux.org/en/py/latest/reference/libtmux-exc-libtmuxexception/)tagged with the tmux subcommand on stderr.

  Centralizes the `if proc.stderr: raise exc.LibTmuxException(proc.stderr)` pattern scattered across the wrappers. Tags the exception with the originating tmux subcommand so downstream consumers (e.g. libtmux-mcp's `handle_tool_errors`) keep the "which tmux command failed" context.

  Examples

  ```python
  >>> from libtmux.common import raise_if_stderr
  >>> from libtmux import exc
  >>> proc = session.cmd("display-message", "-p", "#{session_id}")
  >>> raise_if_stderr(proc, "display-message")  # no stderr → no raise
  ```

  * Parameters

    * **proc** ( [tmux\_cmd](https://libtmux.org/en/py/latest/reference/libtmux-common-tmux_cmd/ "libtmux.common.tmux_cmd") ) – Result of a [`Server.cmd` ](https://libtmux.org/en/py/latest/reference/libtmux-server-cmd/)/ [`Session.cmd` ](https://libtmux.org/en/py/latest/reference/libtmux-session-cmd/)/ etc. call.

    * **subcommand** ( [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") ) – The tmux subcommand the wrapper invoked, e.g. `"last-window"`, `"swap-pane"`. Surfaces in `str(exc)` as a `"<subcommand>: …"` prefix.

  * Raises

    * [LibTmuxException](https://libtmux.org/en/py/latest/reference/libtmux-exc-libtmuxexception/ "libtmux.exc.LibTmuxException") – When `proc.stderr` is non-empty.

Errors — Session 6 types

[TmuxSessionExists 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-tmuxsessionexists/)

Session does not exist in the server.

[BadSessionName 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-badsessionname/)

Disallowed session name for tmux (empty, contains periods or colons).

[SessionNotFound 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-sessionnotfound/)

tmux session not found.

[SessionMissingWorkspaceException 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-sessionmissingworkspaceexception/)

Session missing while loading tmuxp workspace.

[ActiveSessionMissingWorkspaceException 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-activesessionmissingworkspaceexception/)

Active session cannot be found while loading tmuxp workspace.

[SessionNameMissingValidationError 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-validation-sessionnamemissingvalidationerror/)

Tmuxp configuration error for session name missing.

Errors — Window 8 types

[WindowError 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-windowerror/)

Any type of window related error.

[MultipleActiveWindows 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-multipleactivewindows/)

Multiple active windows.

[NoActiveWindow 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-noactivewindow/)

No active window found.

[NoWindowsExist 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-nowindowsexist/)

No windows exist for object.

[WindowAdjustmentDirectionRequiresAdjustment 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-windowadjustmentdirectionrequiresadjustment/)

ValueError for `libtmux.Window.resize_window`.

[WindowNotFound 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-windownotfound/)

tmux window not found.

[WindowListMissingValidationError 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-validation-windowlistmissingvalidationerror/)

Tmuxp configuration error for window list missing.

[WindowNameMissingValidationError 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-validation-windownamemissingvalidationerror/)

Tmuxp configuration error for missing window\_name.

Errors — Pane 4 types

[PaneError 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-paneerror/)

Any type of pane related error.

[PaneNotFound 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-panenotfound/)

Pane not found.

[PaneAdjustmentDirectionRequiresAdjustment 2 members](https://libtmux.org/en/py/latest/reference/libtmux-exc-paneadjustmentdirectionrequiresadjustment/)

ValueError for [`libtmux.Pane.resize_pane` ](https://libtmux.org/en/py/latest/reference/libtmux-pane-resize_pane/).

[PaneNotFound 1 members](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-panenotfound/)

tmux pane not found.

Testing utilities 13 functions and constants

* USING\_ZSH = "zsh" in os.getenv("SHELL", "")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L25)] [¶](#libtmux.pytest_plugin.USING_ZSH "Permalink to USING_ZSH")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L25)] [¶](#libtmux.pytest_plugin.USING_ZSH "Permalink to USING_ZSH")

  USING\_ZSH

- \_reap\_test\_server ( *socket\_name : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)")&#x20;*) → [None](https://docs.python.org/3/library/constants.html#None "None (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L28)] [¶](#libtmux.pytest_plugin._reap_test_server "Permalink to _reap_test_server")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L28)] [¶](#libtmux.pytest_plugin._reap_test_server "Permalink to _reap_test_server")

  \_reap\_test\_server

  Kill the tmux daemon on `socket_name` and unlink the socket file.

  Invoked from the [`server` ](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-server/)and [`TestServer` ](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-testserver/)fixture finalizers to guarantee teardown even when the daemon has already exited (`kill` is a no-op then) and the socket file was left on disk. tmux does not reliably `unlink(2)` its socket on non-graceful exit, so `/tmp/tmux-<uid>/` otherwise accumulates stale entries across test runs.

  Conservative: suppresses `LibTmuxException` / `OSError` on both the kill and the unlink. A finalizer that raises replaces the real test failure with a cleanup error, and cleanup failures are not actionable (socket already gone, permissions changed, race with a concurrent pytest-xdist worker).

* clear\_env ( *monkeypatch : pytest.MonkeyPatch&#x20;*) → [None](https://docs.python.org/3/library/constants.html#None "None (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L117)] [¶](#libtmux.pytest_plugin.clear_env "Permalink to clear_env")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L117)] [¶](#libtmux.pytest_plugin.clear_env "Permalink to clear_env")

  clear\_env

  Clear out any unnecessary environment variables that could interrupt tests.

  tmux show-environment tests were being interrupted due to a lot of crazy env vars.

- config\_file ( *user\_path : [pathlib.Path](https://docs.python.org/3/library/pathlib.html#pathlib.Path "pathlib.Path (Python)")&#x20;*) → [pathlib.Path](https://docs.python.org/3/library/pathlib.html#pathlib.Path "pathlib.Path (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L97)] [¶](#libtmux.pytest_plugin.config_file "Permalink to config_file")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L97)] [¶](#libtmux.pytest_plugin.config_file "Permalink to config_file")

  config\_file

  Return fixture for `.tmux.conf` configuration.

  * `base-index -g 1`

  These guarantee pane and windows targets can be reliably referenced and asserted.

  Note: You will need to set the home directory, see set\_home.

* control\_mode ( *server : [Server](https://libtmux.org/en/py/latest/reference/libtmux-server/ "libtmux.Server")&#x20;*, *session : [Session](https://libtmux.org/en/py/latest/reference/libtmux-session/ "libtmux.Session")&#x20;*) → [t.Callable](https://docs.python.org/3/library/typing.html#typing.Callable "t.Callable (Python)")\[\[], [ControlMode](https://libtmux.org/en/py/latest/reference/libtmux-_internal-control_mode-controlmode/ "libtmux._internal.control_mode.ControlMode")]

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L301)] [¶](#libtmux.pytest_plugin.control_mode "Permalink to control_mode")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L301)] [¶](#libtmux.pytest_plugin.control_mode "Permalink to control_mode")

  control\_mode

  Return [`ControlMode` ](https://libtmux.org/en/py/latest/reference/libtmux-_internal-control_mode-controlmode/)context manager factory.

  Returns a callable that creates [`ControlMode` ](https://libtmux.org/en/py/latest/reference/libtmux-_internal-control_mode-controlmode/)context managers bound to the test's server and session. Use as a context manager to spawn a control-mode tmux client.

  While the control-mode client is active, `Server.list_clients()` will include it.

  Examples

  ```python
  >>> from libtmux._internal.control_mode import ControlMode
  >>> def test_example(control_mode):
  ...     with control_mode() as ctl:
  ...         assert ctl.client_name != ''
  ```

- home\_path ( *tmp\_path\_factory : pytest.TempPathFactory&#x20;*) → [pathlib.Path](https://docs.python.org/3/library/pathlib.html#pathlib.Path "pathlib.Path (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L63)] [¶](#libtmux.pytest_plugin.home_path "Permalink to home_path")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L63)] [¶](#libtmux.pytest_plugin.home_path "Permalink to home_path")

  home\_path

  Temporary `/home/` path.

* home\_user\_name ( ) → [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L69)] [¶](#libtmux.pytest_plugin.home_user_name "Permalink to home_user_name")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L69)] [¶](#libtmux.pytest_plugin.home_user_name "Permalink to home_user_name")

  home\_user\_name

  Return default username to set for user\_path fixture.

- server ( *request : pytest.FixtureRequest&#x20;*, *monkeypatch : pytest.MonkeyPatch&#x20;*, *config\_file : [pathlib.Path](https://docs.python.org/3/library/pathlib.html#pathlib.Path "pathlib.Path (Python)")&#x20;*) → [Server](https://libtmux.org/en/py/latest/reference/libtmux-server/ "libtmux.Server")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L145)] [¶](#libtmux.pytest_plugin.server "Permalink to server")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L145)] [¶](#libtmux.pytest_plugin.server "Permalink to server")

  server

  Return new, temporary [`libtmux.Server` ](https://libtmux.org/en/py/latest/reference/libtmux-server/).

  \>>> from libtmux.server import Server

  \>>> def test\_example(server: Server) -> None: ... assert isinstance(server, Server) ... session = server.new\_session('my session') ... assert len(server.sessions) == 1 ... assert \[session.name.startswith('my') for session in server.sessions]

  .. :: >>> locals().keys() dict\_keys(...)

  \>>> source = ''.join(\[e.source for e in request.\_pyfuncitem.dtest.examples]\[:3]) >>> pytester = request.getfixturevalue('pytester')

  \>>> pytester.makepyfile(\*\*{'whatever.py': source}) PosixPath(...)

  \>>> result = pytester.runpytest('whatever.py', '--disable-warnings') ===...

  \>>> result.assert\_outcomes(passed=1)

* session ( *request : pytest.FixtureRequest&#x20;*, *session\_params : [dict](https://docs.python.org/3/library/stdtypes.html#dict "dict (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [t.Any](https://docs.python.org/3/library/typing.html#typing.Any "t.Any (Python)")]&#x20;*, *server : [Server](https://libtmux.org/en/py/latest/reference/libtmux-server/ "libtmux.Server")&#x20;*) → [Session](https://libtmux.org/en/py/latest/reference/libtmux-session/ "libtmux.Session")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L224)] [¶](#libtmux.pytest_plugin.session "Permalink to session")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L224)] [¶](#libtmux.pytest_plugin.session "Permalink to session")

  session

  Return new, temporary [`libtmux.Session` ](https://libtmux.org/en/py/latest/reference/libtmux-session/).

  \>>> from libtmux.session import Session

  \>>> def test\_example(session: "Session") -> None: ... assert isinstance(session.name, str) ... assert session.name.startswith('libtmux\_') ... window = session.new\_window(window\_name='new one') ... assert window\.name == 'new one'

  .. :: >>> locals().keys() dict\_keys(...)

  \>>> source = ''.join(\[e.source for e in request.\_pyfuncitem.dtest.examples]\[:3]) >>> pytester = request.getfixturevalue('pytester')

  \>>> pytester.makepyfile(\*\*{'whatever.py': source}) PosixPath(...)

  \>>> result = pytester.runpytest('whatever.py', '--disable-warnings') ===...

  \>>> result.assert\_outcomes(passed=1)

- session\_params ( ) → [dict](https://docs.python.org/3/library/stdtypes.html#dict "dict (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [t.Any](https://docs.python.org/3/library/typing.html#typing.Any "t.Any (Python)")]

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L186)] [¶](#libtmux.pytest_plugin.session_params "Permalink to session_params")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L186)] [¶](#libtmux.pytest_plugin.session_params "Permalink to session_params")

  session\_params

  Return default session creation parameters.

  \>>> import pytest >>> from libtmux.session import Session

  \>>> @pytest.fixture ... def session\_params(session\_params): ... return { ... 'x': 800, ... 'y': 600, ... }

  \>>> def test\_example(session: "Session") -> None: ... assert isinstance(session.name, str) ... assert session.name.startswith('libtmux\_') ... window = session.new\_window(window\_name='new one') ... assert window\.name == 'new one'

  .. :: >>> locals().keys() dict\_keys(...)

  \>>> source = ''.join(\[e.source for e in request.\_pyfuncitem.dtest.examples]\[:4]) >>> pytester = request.getfixturevalue('pytester')

  \>>> pytester.makepyfile(\*\*{'whatever.py': source}) PosixPath(...)

  \>>> result = pytester.runpytest('whatever.py', '--disable-warnings') ===...

  \>>> result.assert\_outcomes(passed=1)

  Discussed in [Testing with libtmux](https://libtmux.org/en/guides/testing-with-libtmux/)

* TestServer ( *request : pytest.FixtureRequest&#x20;*) → [type](https://docs.python.org/3/library/functions.html#type "type (Python)")\[[Server](https://libtmux.org/en/py/latest/reference/libtmux-server/ "libtmux.Server")]

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L325)] [¶](#libtmux.pytest_plugin.TestServer "Permalink to TestServer")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L325)] [¶](#libtmux.pytest_plugin.TestServer "Permalink to TestServer")

  TestServer

  Create a temporary tmux server that cleans up after itself.

  This is similar to the server pytest fixture, but can be used outside of pytest. The server will be killed when the test completes.

  Examples

  ```python
  >>> server = Server()  # Create server instance
  >>> server.new_session()
  Session($... ...)
  >>> server.is_alive()
  True
  >>> # Each call creates a new server with unique socket
  >>> server2 = Server()
  >>> server2.socket_name != server.socket_name
  True
  ```

- user\_path ( *home\_path : [pathlib.Path](https://docs.python.org/3/library/pathlib.html#pathlib.Path "pathlib.Path (Python)")&#x20;*, *home\_user\_name : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*) → [pathlib.Path](https://docs.python.org/3/library/pathlib.html#pathlib.Path "pathlib.Path (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L75)] [¶](#libtmux.pytest_plugin.user_path "Permalink to user_path")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L75)] [¶](#libtmux.pytest_plugin.user_path "Permalink to user_path")

  user\_path

  Ensure and return temporary user directory.

  Note: You will need to set the home directory, see set\_home.

* zshrc ( *user\_path : [pathlib.Path](https://docs.python.org/3/library/pathlib.html#pathlib.Path "pathlib.Path (Python)")&#x20;*) → [pathlib.Path](https://docs.python.org/3/library/pathlib.html#pathlib.Path "pathlib.Path (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L86)] [¶](#libtmux.pytest_plugin.zshrc "Permalink to zshrc")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L86)] [¶](#libtmux.pytest_plugin.zshrc "Permalink to zshrc")

  zshrc

  Suppress ZSH default message.

  Needs a startup file .zshenv, .zprofile, .zshrc, .zlogin.

Internal 7 types, 51 functions and constants

[Hooks 92 members](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-hooks/)

tmux hooks data structure.

[ControlMode 9 members](https://libtmux.org/en/py/latest/reference/libtmux-_internal-control_mode-controlmode/)

Context manager that spawns a tmux control-mode client.

[SkipDefaultFieldsReprMixin 1 members](https://libtmux.org/en/py/latest/reference/libtmux-_internal-dataclasses-skipdefaultfieldsreprmixin/)

Skip default fields in [`dataclass` ](https://docs.python.org/3/library/dataclasses.html#dataclasses.dataclass)object representation.

[PKRequiredException 1 members](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-pkrequiredexception/)

Raised when [`QueryList.items` ](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-querylist-items/)is called without a primary key.

[OpNotFound 1 members](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-opnotfound/)

Raised when a filter names a lookup that does not exist.

[QueryList 7 members](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-querylist/)

Filter list of object/dictionaries. For small, local datasets.

[SparseArray 4 members](https://libtmux.org/en/py/latest/reference/libtmux-_internal-sparse_array-sparsearray/)

Support non-sequential indexes while maintaining [`list` ](https://docs.python.org/3/library/stdtypes.html#list)-like behavior.

* \_\_author\_\_ = "Tony Narlock"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L10)] [¶](#libtmux.__author__ "Permalink to __author__")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L10)] [¶](#libtmux.__author__ "Permalink to __author__")

  \_\_author\_\_

- \_\_copyright\_\_ = "Copyright 2016- Tony Narlock"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L16)] [¶](#libtmux.__copyright__ "Permalink to __copyright__")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L16)] [¶](#libtmux.__copyright__ "Permalink to __copyright__")

  \_\_copyright\_\_

* \_\_description\_\_ = "Typed scripting library / ORM / API wrapper for tmux"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L8)] [¶](#libtmux.__description__ "Permalink to __description__")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L8)] [¶](#libtmux.__description__ "Permalink to __description__")

  \_\_description\_\_

- \_\_docs\_\_ = "https\://libtmux.git-pull.com"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L12)] [¶](#libtmux.__about__.__docs__ "Permalink to __docs__")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L12)] [¶](#libtmux.__about__.__docs__ "Permalink to __docs__")

  \_\_docs\_\_

* \_\_email\_\_ = "tony\@git-pull.com"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L9)] [¶](#libtmux.__email__ "Permalink to __email__")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L9)] [¶](#libtmux.__email__ "Permalink to __email__")

  \_\_email\_\_

- \_\_github\_\_ = "https\://github.com/tmux-python/libtmux"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L11)] [¶](#libtmux.__about__.__github__ "Permalink to __github__")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L11)] [¶](#libtmux.__about__.__github__ "Permalink to __github__")

  \_\_github\_\_

* \_\_license\_\_ = "MIT"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L15)] [¶](#libtmux.__license__ "Permalink to __license__")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L15)] [¶](#libtmux.__license__ "Permalink to __license__")

  \_\_license\_\_

- \_\_package\_name\_\_ = "libtmux"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L6)] [¶](#libtmux.__package_name__ "Permalink to __package_name__")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L6)] [¶](#libtmux.__package_name__ "Permalink to __package_name__")

  \_\_package\_name\_\_

* \_\_pypi\_\_ = "https\://pypi.org/project/libtmux/"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L14)] [¶](#libtmux.__about__.__pypi__ "Permalink to __pypi__")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L14)] [¶](#libtmux.__about__.__pypi__ "Permalink to __pypi__")

  \_\_pypi\_\_

- \_\_title\_\_ = "libtmux"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L5)] [¶](#libtmux.__title__ "Permalink to __title__")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L5)] [¶](#libtmux.__title__ "Permalink to __title__")

  \_\_title\_\_

* \_\_tracker\_\_ = "https\://github.com/tmux-python/libtmux/issues"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L13)] [¶](#libtmux.__about__.__tracker__ "Permalink to __tracker__")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__about__.py#L13)] [¶](#libtmux.__about__.__tracker__ "Permalink to __tracker__")

  \_\_tracker\_\_

- HookArray : [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias "TypeAlias (external)") = "dict\[str, SparseArray\[str]]"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/constants.py#L19)] [¶](#libtmux._internal.constants.HookArray "Permalink to HookArray")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/constants.py#L19)] [¶](#libtmux._internal.constants.HookArray "Permalink to HookArray")

  HookArray

* HookArray : [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias "TypeAlias (external)") = "dict\[str, SparseArray\[str]]"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/sparse_array.py#L14)] [¶](#libtmux._internal.sparse_array.HookArray "Permalink to HookArray")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/sparse_array.py#L14)] [¶](#libtmux._internal.sparse_array.HookArray "Permalink to HookArray")

  HookArray

- logger = logging.getLogger(\_\_name\_\_)

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L20)] [¶](#libtmux._internal.query_list.logger "Permalink to logger")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L20)] [¶](#libtmux._internal.query_list.logger "Permalink to logger")

  logger

* logger = logging.getLogger(\_\_name\_\_)

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/client.py#L24)] [¶](#libtmux.client.logger "Permalink to logger")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/client.py#L24)] [¶](#libtmux.client.logger "Permalink to logger")

  logger

- logger = logging.getLogger(\_\_name\_\_)

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L25)] [¶](#libtmux.common.logger "Permalink to logger")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/common.py#L25)] [¶](#libtmux.common.logger "Permalink to logger")

  logger

* logger = logging.getLogger(\_\_name\_\_)

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/hooks.py#L56)] [¶](#libtmux.hooks.logger "Permalink to logger")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/hooks.py#L56)] [¶](#libtmux.hooks.logger "Permalink to logger")

  logger

- logger = logging.getLogger(\_\_name\_\_)

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L23)] [¶](#libtmux.neo.logger "Permalink to logger")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/neo.py#L23)] [¶](#libtmux.neo.logger "Permalink to logger")

  logger

* logger = logging.getLogger(\_\_name\_\_)

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L117)] [¶](#libtmux.options.logger "Permalink to logger")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/options.py#L117)] [¶](#libtmux.options.logger "Permalink to logger")

  logger

- logger = logging.getLogger(\_\_name\_\_)

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pane.py#L46)] [¶](#libtmux.pane.logger "Permalink to logger")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pane.py#L46)] [¶](#libtmux.pane.logger "Permalink to logger")

  logger

* logger = logging.getLogger(\_\_name\_\_)

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L24)] [¶](#libtmux.pytest_plugin.logger "Permalink to logger")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pytest_plugin.py#L24)] [¶](#libtmux.pytest_plugin.logger "Permalink to logger")

  logger

- logger = logging.getLogger(\_\_name\_\_)

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/server.py#L49)] [¶](#libtmux.server.logger "Permalink to logger")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/server.py#L49)] [¶](#libtmux.server.logger "Permalink to logger")

  logger

* logger = logging.getLogger(\_\_name\_\_)

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/session.py#L48)] [¶](#libtmux.session.logger "Permalink to logger")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/session.py#L48)] [¶](#libtmux.session.logger "Permalink to logger")

  logger

- logger = logging.getLogger(\_\_name\_\_)

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/window.py#L50)] [¶](#libtmux.window.logger "Permalink to logger")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/window.py#L50)] [¶](#libtmux.window.logger "Permalink to logger")

  logger

* LOOKUP\_NAME\_MAP : [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), LookupProtocol] = { "eq": lookup\_exact, "exact": lookup\_exact, "iexact": lookup\_iexact, "contains": lookup\_contains, "icontains": lookup\_icontains, "startswith": lookup\_startswith, "istartswith": lookup\_istartswith, "endswith": lookup\_endswith, "iendswith": lookup\_iendswith, "in": lookup\_in, "nin": lookup\_nin, "regex": lookup\_regex, "iregex": lookup\_iregex, }

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L300)] [¶](#libtmux._internal.query_list.LOOKUP_NAME_MAP "Permalink to LOOKUP_NAME_MAP")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L300)] [¶](#libtmux._internal.query_list.LOOKUP_NAME_MAP "Permalink to LOOKUP_NAME_MAP")

  LOOKUP\_NAME\_MAP

- no\_arg = object()

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L38)] [¶](#libtmux._internal.query_list.no_arg "Permalink to no_arg")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L38)] [¶](#libtmux._internal.query_list.no_arg "Permalink to no_arg")

  no\_arg

* StrPath : [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias "TypeAlias (external)") = "str | PathLike\[str]"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/types.py#L18)] [¶](#libtmux._internal.types.StrPath "Permalink to StrPath")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/types.py#L18)] [¶](#libtmux._internal.types.StrPath "Permalink to StrPath")

  StrPath

- T = t.TypeVar("T")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/constants.py#L16)] [¶](#libtmux._internal.constants.T "Permalink to T")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/constants.py#L16)] [¶](#libtmux._internal.constants.T "Permalink to T")

  T

* T = t.TypeVar("T")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L36)] [¶](#libtmux._internal.query_list.T "Permalink to T")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L36)] [¶](#libtmux._internal.query_list.T "Permalink to T")

  T

- T = t.TypeVar("T")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/sparse_array.py#L13)] [¶](#libtmux._internal.sparse_array.T "Permalink to T")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/sparse_array.py#L13)] [¶](#libtmux._internal.sparse_array.T "Permalink to T")

  T

* TerminalFeatures = dict\[str, list\[str]]

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/constants.py#L18)] [¶](#libtmux._internal.constants.TerminalFeatures "Permalink to TerminalFeatures")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/constants.py#L18)] [¶](#libtmux._internal.constants.TerminalFeatures "Permalink to TerminalFeatures")

  TerminalFeatures

- TMUX : t.Final = "TMUX"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/env.py#L36)] [¶](#libtmux._internal.env.TMUX "Permalink to TMUX")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/env.py#L36)] [¶](#libtmux._internal.env.TMUX "Permalink to TMUX")

  TMUX

  Environment variable tmux exports with `socket_path,server_pid,session_id`.

  Discussed in [Attaching to tmux](https://libtmux.org/en/guides/attaching-to-tmux/) , [Testing with libtmux](https://libtmux.org/en/guides/testing-with-libtmux/) · [Environment](https://libtmux.org/en/topics/environment/)

* TMUX\_PANE : t.Final = "TMUX\_PANE"

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/env.py#L39)] [¶](#libtmux._internal.env.TMUX_PANE "Permalink to TMUX_PANE")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/env.py#L39)] [¶](#libtmux._internal.env.TMUX_PANE "Permalink to TMUX_PANE")

  TMUX\_PANE

  Environment variable tmux exports with the pane's id, e.g. `%3`.

  Discussed in [Attaching to tmux](https://libtmux.org/en/guides/attaching-to-tmux/) , [Testing with libtmux](https://libtmux.org/en/guides/testing-with-libtmux/) · [Python MCP topics](https://libtmux.org/en/py/latest/mcp/topics/) · [Environment](https://libtmux.org/en/topics/environment/)

- is\_sparse\_array\_list ( *items : [ExplodedComplexUntypedOptionsDict](https://libtmux.org/en/py/latest/reference/libtmux-options-explodedcomplexuntypedoptionsdict/ "libtmux.options.ExplodedComplexUntypedOptionsDict")&#x20;*) → [TypeGuard](https://docs.python.org/3/library/typing.html#typing.TypeGuard "TypeGuard (external)")\[[HookArray](https://libtmux.org/en/py/latest/reference/libtmux-_internal-sparse_array-hookarray/ "libtmux._internal.sparse_array.HookArray")]

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/sparse_array.py#L17)] [¶](#libtmux._internal.sparse_array.is_sparse_array_list "Permalink to is_sparse_array_list")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/sparse_array.py#L17)] [¶](#libtmux._internal.sparse_array.is_sparse_array_list "Permalink to is_sparse_array_list")

  is\_sparse\_array\_list

* keygetter ( *obj : [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [t.Any](https://docs.python.org/3/library/typing.html#typing.Any "t.Any (Python)")]&#x20;*, *path : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*) → [t.Any](https://docs.python.org/3/library/typing.html#typing.Any "t.Any (Python)") | [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [None](https://docs.python.org/3/library/constants.html#None "None (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L41)] [¶](#libtmux._internal.query_list.keygetter "Permalink to keygetter")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L41)] [¶](#libtmux._internal.query_list.keygetter "Permalink to keygetter")

  keygetter

  Fetch values in objects and keys, supported nested data.

  **With dictionaries**:

  \>>> keygetter({ "food": { "breakfast": "cereal" } }, "food") {'breakfast': 'cereal'}

  \>>> keygetter({ "food": { "breakfast": "cereal" } }, "food\_\_breakfast") 'cereal'

  **With objects**:

  \>>> from typing import List, Optional >>> from dataclasses import dataclass, field

  \>>> @dataclass() ... class Food: ... fruit: List\[str] = field(default\_factory=list) ... breakfast: Optional\[str] = None

  \>>> @dataclass() ... class Restaurant: ... place: str ... city: str ... state: str ... food: Food = field(default\_factory=Food)

  \>>> restaurant = Restaurant( ... place="Largo", ... city="Tampa", ... state="Florida", ... food=Food( ... fruit=\["banana", "orange"], breakfast="cereal" ... ) ... )

  \>>> restaurant Restaurant(place='Largo', city='Tampa', state='Florida', food=Food(fruit=\['banana', 'orange'], breakfast='cereal'))

  \>>> keygetter(restaurant, "food") Food(fruit=\['banana', 'orange'], breakfast='cereal')

  \>>> keygetter(restaurant, "food\_\_breakfast") 'cereal'

- lookup\_contains ( *data : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*, *rhs : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [re.Pattern](https://docs.python.org/3/library/re.html#re.Pattern "re.Pattern (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L174)] [¶](#libtmux._internal.query_list.lookup_contains "Permalink to lookup_contains")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L174)] [¶](#libtmux._internal.query_list.lookup_contains "Permalink to lookup_contains")

  lookup\_contains

* lookup\_endswith ( *data : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*, *rhs : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [re.Pattern](https://docs.python.org/3/library/re.html#re.Pattern "re.Pattern (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L219)] [¶](#libtmux._internal.query_list.lookup_endswith "Permalink to lookup_endswith")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L219)] [¶](#libtmux._internal.query_list.lookup_endswith "Permalink to lookup_endswith")

  lookup\_endswith

- lookup\_exact ( *data : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*, *rhs : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [re.Pattern](https://docs.python.org/3/library/re.html#re.Pattern "re.Pattern (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L157)] [¶](#libtmux._internal.query_list.lookup_exact "Permalink to lookup_exact")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L157)] [¶](#libtmux._internal.query_list.lookup_exact "Permalink to lookup_exact")

  lookup\_exact

* lookup\_icontains ( *data : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*, *rhs : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [re.Pattern](https://docs.python.org/3/library/re.html#re.Pattern "re.Pattern (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L184)] [¶](#libtmux._internal.query_list.lookup_icontains "Permalink to lookup_icontains")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L184)] [¶](#libtmux._internal.query_list.lookup_icontains "Permalink to lookup_icontains")

  lookup\_icontains

- lookup\_iendswith ( *data : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*, *rhs : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [re.Pattern](https://docs.python.org/3/library/re.html#re.Pattern "re.Pattern (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L229)] [¶](#libtmux._internal.query_list.lookup_iendswith "Permalink to lookup_iendswith")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L229)] [¶](#libtmux._internal.query_list.lookup_iendswith "Permalink to lookup_iendswith")

  lookup\_iendswith

* lookup\_iexact ( *data : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*, *rhs : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [re.Pattern](https://docs.python.org/3/library/re.html#re.Pattern "re.Pattern (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L164)] [¶](#libtmux._internal.query_list.lookup_iexact "Permalink to lookup_iexact")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L164)] [¶](#libtmux._internal.query_list.lookup_iexact "Permalink to lookup_iexact")

  lookup\_iexact

- lookup\_in ( *data : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*, *rhs : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [re.Pattern](https://docs.python.org/3/library/re.html#re.Pattern "re.Pattern (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L238)] [¶](#libtmux._internal.query_list.lookup_in "Permalink to lookup_in")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L238)] [¶](#libtmux._internal.query_list.lookup_in "Permalink to lookup_in")

  lookup\_in

* lookup\_iregex ( *data : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*, *rhs : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [re.Pattern](https://docs.python.org/3/library/re.html#re.Pattern "re.Pattern (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L291)] [¶](#libtmux._internal.query_list.lookup_iregex "Permalink to lookup_iregex")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L291)] [¶](#libtmux._internal.query_list.lookup_iregex "Permalink to lookup_iregex")

  lookup\_iregex

- lookup\_istartswith ( *data : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*, *rhs : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [re.Pattern](https://docs.python.org/3/library/re.html#re.Pattern "re.Pattern (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L209)] [¶](#libtmux._internal.query_list.lookup_istartswith "Permalink to lookup_istartswith")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L209)] [¶](#libtmux._internal.query_list.lookup_istartswith "Permalink to lookup_istartswith")

  lookup\_istartswith

* lookup\_nin ( *data : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*, *rhs : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [re.Pattern](https://docs.python.org/3/library/re.html#re.Pattern "re.Pattern (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L260)] [¶](#libtmux._internal.query_list.lookup_nin "Permalink to lookup_nin")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L260)] [¶](#libtmux._internal.query_list.lookup_nin "Permalink to lookup_nin")

  lookup\_nin

- lookup\_regex ( *data : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*, *rhs : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [re.Pattern](https://docs.python.org/3/library/re.html#re.Pattern "re.Pattern (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L282)] [¶](#libtmux._internal.query_list.lookup_regex "Permalink to lookup_regex")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L282)] [¶](#libtmux._internal.query_list.lookup_regex "Permalink to lookup_regex")

  lookup\_regex

* lookup\_startswith ( *data : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*, *rhs : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)") | [list](https://docs.python.org/3/library/stdtypes.html#list "list (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [re.Pattern](https://docs.python.org/3/library/re.html#re.Pattern "re.Pattern (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]&#x20;*) → [bool](https://docs.python.org/3/library/functions.html#bool "bool (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L199)] [¶](#libtmux._internal.query_list.lookup_startswith "Permalink to lookup_startswith")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L199)] [¶](#libtmux._internal.query_list.lookup_startswith "Permalink to lookup_startswith")

  lookup\_startswith

- pane\_id\_from\_env ( *env : [t.Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "t.Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") = None&#x20;*) → [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/env.py#L125)] [¶](#libtmux._internal.env.pane_id_from_env "Permalink to pane_id_from_env")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/env.py#L125)] [¶](#libtmux._internal.env.pane_id_from_env "Permalink to pane_id_from_env")

  pane\_id\_from\_env

  Return the pane id recorded in `$TMUX_PANE`.

  The `%` sigil is load-bearing: libtmux passes this id straight to tmux as a `-t` target, and tmux's `cmd_find` routes a target to its pane slot \*by sigil\*. A sigil-less value would be matched against session names instead, silently resolving to the wrong object.

  Examples

  ```python
  >>> from libtmux._internal.env import pane_id_from_env
  >>> pane_id_from_env({"TMUX_PANE": "%3"})
  '%3'
  ```

  ```python
  >>> pane_id_from_env({})
  Traceback (most recent call last):
  ...
  libtmux.exc.NotInsideTmux: Not inside a tmux pane: $TMUX_PANE is unset or empty
  ```

  ```python
  >>> pane_id_from_env({"TMUX_PANE": "3"})
  Traceback (most recent call last):
  ...
  libtmux.exc.NotInsideTmux: Not inside a tmux pane: $TMUX_PANE is not a pane id...
  ```

  * Parameters

    * **env** ( [t.Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "t.Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Environment to read. Defaults to [`os.environ` ](https://docs.python.org/3/library/os.html#os.environ).

  * Returns

    str The pane id, e.g. `"%3"`.

  * Raises

    * [NotInsideTmux](https://libtmux.org/en/py/latest/reference/libtmux-exc-notinsidetmux/ "libtmux.exc.NotInsideTmux") – When `$TMUX_PANE` is unset, empty, or is not a `%`-prefixed id.

* parse\_lookup ( *obj : [Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [t.Any](https://docs.python.org/3/library/typing.html#typing.Any "t.Any (Python)")]&#x20;*, *path : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*, *lookup : [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")&#x20;*) → [t.Any](https://docs.python.org/3/library/typing.html#typing.Any "t.Any (Python)") | [None](https://docs.python.org/3/library/constants.html#None "None (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L115)] [¶](#libtmux._internal.query_list.parse_lookup "Permalink to parse_lookup")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/query_list.py#L115)] [¶](#libtmux._internal.query_list.parse_lookup "Permalink to parse_lookup")

  parse\_lookup

  Check if field lookup key, e.g. "my\_\_path\_\_contains" has comparator, return val.

  If comparator not used or value not found, return None.

  \>>> parse\_lookup({ "food": "red apple" }, "food\_\_istartswith", "\_\_istartswith") 'red apple'

  It can also look up objects:

  \>>> from dataclasses import dataclass

  \>>> @dataclass() ... class Inventory: ... food: str

  \>>> item = Inventory(food="red apple")

  \>>> item Inventory(food='red apple')

  \>>> parse\_lookup(item, "food\_\_istartswith", "\_\_istartswith") 'red apple'

- resolve\_env ( *env : [t.Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "t.Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") = None&#x20;*) → [t.Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "t.Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")]

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/env.py#L43)] [¶](#libtmux._internal.env.resolve_env "Permalink to resolve_env")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/env.py#L43)] [¶](#libtmux._internal.env.resolve_env "Permalink to resolve_env")

  resolve\_env

  Return \*env\*, defaulting to the live process environment.

  Examples

  ```python
  >>> from libtmux._internal.env import resolve_env
  >>> resolve_env({"TMUX_PANE": "%1"})
  {'TMUX_PANE': '%1'}
  ```

  ```python
  >>> resolve_env() is os.environ
  True
  ```

  * Parameters

    * **env** ( [t.Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "t.Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Environment to read. Defaults to [`os.environ` ](https://docs.python.org/3/library/os.html#os.environ).

  * Returns

    [`typing.Mapping` ](https://docs.python.org/3/library/typing.html#typing.Mapping)The mapping to read tmux variables from.

* socket\_path\_from\_env ( *env : [t.Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "t.Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") = None&#x20;*) → [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/env.py#L68)] [¶](#libtmux._internal.env.socket_path_from_env "Permalink to socket_path_from_env")

  function \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/_internal/env.py#L68)] [¶](#libtmux._internal.env.socket_path_from_env "Permalink to socket_path_from_env")

  socket\_path\_from\_env

  Return the tmux socket path recorded in `$TMUX`.

  `$TMUX` is `"<socket_path>,<server_pid>,<session_id>"`. The pid and session id are integers, so any comma in the value belongs to the socket path -- split from the \*right\*.

  The pid and session id are deliberately discarded: both are frozen at pane spawn, and the session id goes stale as soon as the pane's window is moved between sessions.

  Examples

  ```python
  >>> from libtmux._internal.env import socket_path_from_env
  >>> socket_path_from_env({"TMUX": "/tmp/tmux-1000/default,84215,0"})
  '/tmp/tmux-1000/default'
  ```

  A comma in the socket path is safe, because the split runs from the right:

  ```python
  >>> socket_path_from_env({"TMUX": "/tmp/od,d/sock,84215,3"})
  '/tmp/od,d/sock'
  ```

  Outside tmux there is nothing to read:

  ```python
  >>> socket_path_from_env({})
  Traceback (most recent call last):
  ...
  libtmux.exc.NotInsideTmux: Not inside a tmux pane: $TMUX is unset or empty
  ```

  * Parameters

    * **env** ( [t.Mapping](https://docs.python.org/3/library/typing.html#typing.Mapping "t.Mapping (Python)")\[[str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)"), [str](https://docs.python.org/3/library/stdtypes.html#str "str (Python)")] | [None](https://docs.python.org/3/library/constants.html#None "None (Python)") ) – Environment to read. Defaults to [`os.environ` ](https://docs.python.org/3/library/os.html#os.environ).

  * Returns

    str Path of the tmux server's socket.

  * Raises

    * [NotInsideTmux](https://libtmux.org/en/py/latest/reference/libtmux-exc-notinsidetmux/ "libtmux.exc.NotInsideTmux") – When `$TMUX` is unset, empty, or not shaped like tmux's triple.

Internal — Options 5 types

[ServerOptions 23 members](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-serveroptions/)

Container for tmux server options.

[SessionOptions 55 members](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-sessionoptions/)

Container for tmux session options.

[WindowOptions 48 members](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-windowoptions/)

Container for tmux window options.

[PaneOptions 19 members](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-paneoptions/)

Container for tmux pane options.

[Options 136 members](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-options/)

Container for all tmux options (server, session, window, and pane).

Other 2 types, 2 functions and constants

[\_DefaultOptionScope 0 members](https://libtmux.org/en/py/latest/reference/libtmux-constants-_defaultoptionscope/)

Sentinel meaning "whichever scope tmux would use".

[Obj 180 members](https://libtmux.org/en/py/latest/reference/libtmux-neo-obj/)

Dataclass of generic tmux object.

* \_\_all\_\_ = ( "Client", "Pane", "Server", "Session", "Window", "\_\_author\_\_", "\_\_copyright\_\_", "\_\_description\_\_", "\_\_email\_\_", "\_\_license\_\_", "\_\_package\_name\_\_", "\_\_title\_\_", "\_\_version\_\_", )

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__init__.py#L25)] [¶](#libtmux.__all__ "Permalink to __all__")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/__init__.py#L25)] [¶](#libtmux.__all__ "Permalink to __all__")

  \_\_all\_\_

- DEFAULT\_OPTION\_SCOPE : [\_DefaultOptionScope](https://libtmux.org/en/py/latest/reference/libtmux-constants-_defaultoptionscope/ "libtmux.constants._DefaultOptionScope") = \_DefaultOptionScope()

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/constants.py#L61)] [¶](#libtmux.constants.DEFAULT_OPTION_SCOPE "Permalink to DEFAULT_OPTION_SCOPE")

  constant \[[source](https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/constants.py#L61)] [¶](#libtmux.constants.DEFAULT_OPTION_SCOPE "Permalink to DEFAULT_OPTION_SCOPE")

  DEFAULT\_OPTION\_SCOPE

## By module 73 modules

* libtmux 14

  * [Client](https://libtmux.org/en/py/latest/reference/libtmux-client/)
  * [Pane](https://libtmux.org/en/py/latest/reference/libtmux-pane/)
  * [Server](https://libtmux.org/en/py/latest/reference/libtmux-server/)
  * [Session](https://libtmux.org/en/py/latest/reference/libtmux-session/)
  * [Window](https://libtmux.org/en/py/latest/reference/libtmux-window/)
  * [\_​\_all​\_\_](https://libtmux.org/en/py/latest/reference/libtmux-__all__/)
  * [\_​\_author​\_\_](https://libtmux.org/en/py/latest/reference/libtmux-__author__/)
  * [\_​\_copyright​\_\_](https://libtmux.org/en/py/latest/reference/libtmux-__copyright__/)
  * [\_​\_description​\_\_](https://libtmux.org/en/py/latest/reference/libtmux-__description__/)
  * [\_​\_email​\_\_](https://libtmux.org/en/py/latest/reference/libtmux-__email__/)
  * [\_​\_license​\_\_](https://libtmux.org/en/py/latest/reference/libtmux-__license__/)
  * [\_​\_package​\_name​\_\_](https://libtmux.org/en/py/latest/reference/libtmux-__package_name__/)
  * [\_​\_title​\_\_](https://libtmux.org/en/py/latest/reference/libtmux-__title__/)
  * [\_​\_version​\_\_](https://libtmux.org/en/py/latest/reference/libtmux-__version__/)

* libtmux\_mcp 1

  * [main](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-main/)

* libtmux\_mcp.middleware 6

  * [Audit​Middleware](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-middleware-auditmiddleware/)
  * [Tail​Preserving​Response​Limiting​Middleware](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-middleware-tailpreservingresponselimitingmiddleware/)
  * [Tool​Error​Result​Middleware](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-middleware-toolerrorresultmiddleware/)
  * [Toolset​Middleware](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-middleware-toolsetmiddleware/)
  * [DEFAULT​\_RESPONSE​\_LIMIT​\_BYTES](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-middleware-default_response_limit_bytes/)
  * [install​\_fastmcp​\_validation​\_log​\_filter](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-middleware-install_fastmcp_validation_log_filter/)

* libtmux\_mcp.models 24

  * [Buffer​Content](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-buffercontent/)
  * [Buffer​Ref](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-bufferref/)
  * [Capture​Since​Result](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-capturesinceresult/)
  * [Environment​Result](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-environmentresult/)
  * [Environment​Set​Result](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-environmentsetresult/)
  * [Hook​Entry](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-hookentry/)
  * [Hook​List​Result](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-hooklistresult/)
  * [Option​Result](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-optionresult/)
  * [Option​Set​Result](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-optionsetresult/)
  * [Pane​Content​Match](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-panecontentmatch/)
  * [Pane​Info](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-paneinfo/)
  * [Pane​Snapshot](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-panesnapshot/)
  * [Run​Command​Result](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-runcommandresult/)
  * [Search​Panes​Result](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-searchpanesresult/)
  * [Send​Keys​Batch​Result](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-sendkeysbatchresult/)
  * [Send​Keys​Operation](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-sendkeysoperation/)
  * [Send​Keys​Operation​Result](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-sendkeysoperationresult/)
  * [Server​Info](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-serverinfo/)
  * [Session​Info](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-sessioninfo/)
  * [Tool​Call​Batch​Result](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-toolcallbatchresult/)
  * [Tool​Call​Operation](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-toolcalloperation/)
  * [Tool​Call​Operation​Result](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-toolcalloperationresult/)
  * [Wait​For​Text​Result](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-waitfortextresult/)
  * [Window​Info](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-models-windowinfo/)

* libtmux\_mcp.prompts 2

  * [ENV​\_PROMPTS​\_AS​\_TOOLS](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-prompts-env_prompts_as_tools/)
  * [register​\_prompts](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-prompts-register_prompts/)

* libtmux\_mcp.resources 1

  * [register​\_resources](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-resources-register_resources/)

* libtmux\_mcp.server 4

  * [DEFAULT​\_TOOLSETS](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-server-default_toolsets/)
  * [mcp](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-server-mcp/)
  * [build​\_mcp​\_server](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-server-build_mcp_server/)
  * [run​\_server](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-server-run_server/)

* libtmux\_mcp.tools 1

  * [register​\_tools](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-register_tools/)

* libtmux.\_\_about\_\_ 4

  * [\_​\_docs​\_\_](https://libtmux.org/en/py/latest/reference/libtmux-__about__-__docs__/)
  * [\_​\_github​\_\_](https://libtmux.org/en/py/latest/reference/libtmux-__about__-__github__/)
  * [\_​\_pypi​\_\_](https://libtmux.org/en/py/latest/reference/libtmux-__about__-__pypi__/)
  * [\_​\_tracker​\_\_](https://libtmux.org/en/py/latest/reference/libtmux-__about__-__tracker__/)

* libtmux.client 1

  * [logger](https://libtmux.org/en/py/latest/reference/libtmux-client-logger/)

* libtmux.common 25

  * [Cmd​Mixin](https://libtmux.org/en/py/latest/reference/libtmux-common-cmdmixin/)
  * [Cmd​Protocol](https://libtmux.org/en/py/latest/reference/libtmux-common-cmdprotocol/)
  * [Environment​Mixin](https://libtmux.org/en/py/latest/reference/libtmux-common-environmentmixin/)
  * [tmux​\_cmd](https://libtmux.org/en/py/latest/reference/libtmux-common-tmux_cmd/)
  * [logger](https://libtmux.org/en/py/latest/reference/libtmux-common-logger/)
  * [Pane​Dict](https://libtmux.org/en/py/latest/reference/libtmux-common-panedict/)
  * [Session​Dict](https://libtmux.org/en/py/latest/reference/libtmux-common-sessiondict/)
  * [TMUX​\_MAX​\_VERSION](https://libtmux.org/en/py/latest/reference/libtmux-common-tmux_max_version/)
  * [TMUX​\_MIN​\_VERSION](https://libtmux.org/en/py/latest/reference/libtmux-common-tmux_min_version/)
  * [Window​Dict](https://libtmux.org/en/py/latest/reference/libtmux-common-windowdict/)
  * [Window​Option​Dict](https://libtmux.org/en/py/latest/reference/libtmux-common-windowoptiondict/)
  * [\_Tmux​Version​Unavailable](https://libtmux.org/en/py/latest/reference/libtmux-common-_tmuxversionunavailable/)
  * [\_no​\_version​\_flag​\_fallback](https://libtmux.org/en/py/latest/reference/libtmux-common-_no_version_flag_fallback/)
  * [\_query​\_version](https://libtmux.org/en/py/latest/reference/libtmux-common-_query_version/)
  * [get​\_libtmux​\_version](https://libtmux.org/en/py/latest/reference/libtmux-common-get_libtmux_version/)
  * [get​\_version](https://libtmux.org/en/py/latest/reference/libtmux-common-get_version/)
  * [get​\_version​\_str](https://libtmux.org/en/py/latest/reference/libtmux-common-get_version_str/)
  * [has​\_gt​\_version](https://libtmux.org/en/py/latest/reference/libtmux-common-has_gt_version/)
  * [has​\_gte​\_version](https://libtmux.org/en/py/latest/reference/libtmux-common-has_gte_version/)
  * [has​\_lt​\_version](https://libtmux.org/en/py/latest/reference/libtmux-common-has_lt_version/)
  * [has​\_lte​\_version](https://libtmux.org/en/py/latest/reference/libtmux-common-has_lte_version/)
  * [has​\_minimum​\_version](https://libtmux.org/en/py/latest/reference/libtmux-common-has_minimum_version/)
  * [has​\_version](https://libtmux.org/en/py/latest/reference/libtmux-common-has_version/)
  * [raise​\_if​\_stderr](https://libtmux.org/en/py/latest/reference/libtmux-common-raise_if_stderr/)
  * [session​\_check​\_name](https://libtmux.org/en/py/latest/reference/libtmux-common-session_check_name/)

* libtmux.constants 11

  * [Option​Scope](https://libtmux.org/en/py/latest/reference/libtmux-constants-optionscope/)
  * [Pane​Direction](https://libtmux.org/en/py/latest/reference/libtmux-constants-panedirection/)
  * [Resize​Adjustment​Direction](https://libtmux.org/en/py/latest/reference/libtmux-constants-resizeadjustmentdirection/)
  * [Window​Direction](https://libtmux.org/en/py/latest/reference/libtmux-constants-windowdirection/)
  * [\_Default​Option​Scope](https://libtmux.org/en/py/latest/reference/libtmux-constants-_defaultoptionscope/)
  * [DEFAULT​\_OPTION​\_SCOPE](https://libtmux.org/en/py/latest/reference/libtmux-constants-default_option_scope/)
  * [HOOK​\_SCOPE​\_FLAG​\_MAP](https://libtmux.org/en/py/latest/reference/libtmux-constants-hook_scope_flag_map/)
  * [OPTION​\_SCOPE​\_FLAG​\_MAP](https://libtmux.org/en/py/latest/reference/libtmux-constants-option_scope_flag_map/)
  * [PANE​\_DIRECTION​\_FLAG​\_MAP](https://libtmux.org/en/py/latest/reference/libtmux-constants-pane_direction_flag_map/)
  * [RESIZE​\_ADJUSTMENT​\_DIRECTION​\_FLAG​\_MAP](https://libtmux.org/en/py/latest/reference/libtmux-constants-resize_adjustment_direction_flag_map/)
  * [WINDOW​\_DIRECTION​\_FLAG​\_MAP](https://libtmux.org/en/py/latest/reference/libtmux-constants-window_direction_flag_map/)

* libtmux.exc 28

  * [Tmux​Object​Does​Not​Exist](https://libtmux.org/en/py/latest/reference/libtmux-exc-tmuxobjectdoesnotexist/)
  * [Unknown​Color​Option](https://libtmux.org/en/py/latest/reference/libtmux-exc-unknowncoloroption/)
  * [Adjustment​Direction​Requires​Adjustment](https://libtmux.org/en/py/latest/reference/libtmux-exc-adjustmentdirectionrequiresadjustment/)
  * [Ambiguous​Option](https://libtmux.org/en/py/latest/reference/libtmux-exc-ambiguousoption/)
  * [Bad​Session​Name](https://libtmux.org/en/py/latest/reference/libtmux-exc-badsessionname/)
  * [Deprecated​Error](https://libtmux.org/en/py/latest/reference/libtmux-exc-deprecatederror/)
  * [Invalid​Option](https://libtmux.org/en/py/latest/reference/libtmux-exc-invalidoption/)
  * [Lib​Tmux​Exception](https://libtmux.org/en/py/latest/reference/libtmux-exc-libtmuxexception/)
  * [Multiple​Active​Windows](https://libtmux.org/en/py/latest/reference/libtmux-exc-multipleactivewindows/)
  * [Multiple​Objects​Returned](https://libtmux.org/en/py/latest/reference/libtmux-exc-multipleobjectsreturned/)
  * [No​Active​Window](https://libtmux.org/en/py/latest/reference/libtmux-exc-noactivewindow/)
  * [Not​Inside​Tmux](https://libtmux.org/en/py/latest/reference/libtmux-exc-notinsidetmux/)
  * [No​Windows​Exist](https://libtmux.org/en/py/latest/reference/libtmux-exc-nowindowsexist/)
  * [Object​Does​Not​Exist](https://libtmux.org/en/py/latest/reference/libtmux-exc-objectdoesnotexist/)
  * [Option​Error](https://libtmux.org/en/py/latest/reference/libtmux-exc-optionerror/)
  * [Pane​Adjustment​Direction​Requires​Adjustment](https://libtmux.org/en/py/latest/reference/libtmux-exc-paneadjustmentdirectionrequiresadjustment/)
  * [Pane​Error](https://libtmux.org/en/py/latest/reference/libtmux-exc-paneerror/)
  * [Pane​Not​Found](https://libtmux.org/en/py/latest/reference/libtmux-exc-panenotfound/)
  * [Requires​Digit​Or​Percentage](https://libtmux.org/en/py/latest/reference/libtmux-exc-requiresdigitorpercentage/)
  * [Tmux​Command​Not​Found](https://libtmux.org/en/py/latest/reference/libtmux-exc-tmuxcommandnotfound/)
  * [Tmux​Session​Exists](https://libtmux.org/en/py/latest/reference/libtmux-exc-tmuxsessionexists/)
  * [Unknown​Option](https://libtmux.org/en/py/latest/reference/libtmux-exc-unknownoption/)
  * [Variable​Unpacking​Error](https://libtmux.org/en/py/latest/reference/libtmux-exc-variableunpackingerror/)
  * [Version​Too​Low](https://libtmux.org/en/py/latest/reference/libtmux-exc-versiontoolow/)
  * [Wait​Timeout](https://libtmux.org/en/py/latest/reference/libtmux-exc-waittimeout/)
  * [Window​Adjustment​Direction​Requires​Adjustment](https://libtmux.org/en/py/latest/reference/libtmux-exc-windowadjustmentdirectionrequiresadjustment/)
  * [Window​Error](https://libtmux.org/en/py/latest/reference/libtmux-exc-windowerror/)
  * [\_format​\_query](https://libtmux.org/en/py/latest/reference/libtmux-exc-_format_query/)

* libtmux.formats 5

  * [CLIENT​\_FORMATS](https://libtmux.org/en/py/latest/reference/libtmux-formats-client_formats/)
  * [FORMAT​\_SEPARATOR](https://libtmux.org/en/py/latest/reference/libtmux-formats-format_separator/)
  * [PANE​\_FORMATS](https://libtmux.org/en/py/latest/reference/libtmux-formats-pane_formats/)
  * [SESSION​\_FORMATS](https://libtmux.org/en/py/latest/reference/libtmux-formats-session_formats/)
  * [WINDOW​\_FORMATS](https://libtmux.org/en/py/latest/reference/libtmux-formats-window_formats/)

* libtmux.hooks 4

  * [Hooks​Mixin](https://libtmux.org/en/py/latest/reference/libtmux-hooks-hooksmixin/)
  * [Hook​Dict](https://libtmux.org/en/py/latest/reference/libtmux-hooks-hookdict/)
  * [Hook​Values](https://libtmux.org/en/py/latest/reference/libtmux-hooks-hookvalues/)
  * [logger](https://libtmux.org/en/py/latest/reference/libtmux-hooks-logger/)

* libtmux.neo 18

  * [Obj](https://libtmux.org/en/py/latest/reference/libtmux-neo-obj/)
  * [\_CONTEXT​\_ONLY​\_TOKENS](https://libtmux.org/en/py/latest/reference/libtmux-neo-_context_only_tokens/)
  * [\_SCOPE​\_OVERRIDES](https://libtmux.org/en/py/latest/reference/libtmux-neo-_scope_overrides/)
  * [\_SCOPE​\_PREFIXES](https://libtmux.org/en/py/latest/reference/libtmux-neo-_scope_prefixes/)
  * [\_UNIVERSAL​\_TOKENS](https://libtmux.org/en/py/latest/reference/libtmux-neo-_universal_tokens/)
  * [FIELD​\_VERSION](https://libtmux.org/en/py/latest/reference/libtmux-neo-field_version/)
  * [logger](https://libtmux.org/en/py/latest/reference/libtmux-neo-logger/)
  * [Output​Raw](https://libtmux.org/en/py/latest/reference/libtmux-neo-outputraw/)
  * [Outputs​Raw](https://libtmux.org/en/py/latest/reference/libtmux-neo-outputsraw/)
  * [SCOPES​\_BY​\_LIST​\_CMD](https://libtmux.org/en/py/latest/reference/libtmux-neo-scopes_by_list_cmd/)
  * [\_best​\_winlink](https://libtmux.org/en/py/latest/reference/libtmux-neo-_best_winlink/)
  * [\_is​\_target​\_not​\_found​\_error](https://libtmux.org/en/py/latest/reference/libtmux-neo-_is_target_not_found_error/)
  * [\_normalize​\_tmux​\_version](https://libtmux.org/en/py/latest/reference/libtmux-neo-_normalize_tmux_version/)
  * [\_token​\_scope](https://libtmux.org/en/py/latest/reference/libtmux-neo-_token_scope/)
  * [fetch​\_obj](https://libtmux.org/en/py/latest/reference/libtmux-neo-fetch_obj/)
  * [fetch​\_objs](https://libtmux.org/en/py/latest/reference/libtmux-neo-fetch_objs/)
  * [get​\_output​\_format](https://libtmux.org/en/py/latest/reference/libtmux-neo-get_output_format/)
  * [parse​\_output](https://libtmux.org/en/py/latest/reference/libtmux-neo-parse_output/)

* libtmux.options 18

  * [Options​Mixin](https://libtmux.org/en/py/latest/reference/libtmux-options-optionsmixin/)
  * [\_V](https://libtmux.org/en/py/latest/reference/libtmux-options-_v/)
  * [Command​Aliases](https://libtmux.org/en/py/latest/reference/libtmux-options-commandaliases/)
  * [Converted​Value](https://libtmux.org/en/py/latest/reference/libtmux-options-convertedvalue/)
  * [Converted​Values](https://libtmux.org/en/py/latest/reference/libtmux-options-convertedvalues/)
  * [Exploded​Complex​Untyped​Options​Dict](https://libtmux.org/en/py/latest/reference/libtmux-options-explodedcomplexuntypedoptionsdict/)
  * [Exploded​Untyped​Options​Dict](https://libtmux.org/en/py/latest/reference/libtmux-options-explodeduntypedoptionsdict/)
  * [logger](https://libtmux.org/en/py/latest/reference/libtmux-options-logger/)
  * [Option​Dict](https://libtmux.org/en/py/latest/reference/libtmux-options-optiondict/)
  * [Terminal​Override](https://libtmux.org/en/py/latest/reference/libtmux-options-terminaloverride/)
  * [Terminal​Overrides](https://libtmux.org/en/py/latest/reference/libtmux-options-terminaloverrides/)
  * [Untyped​Options​Dict](https://libtmux.org/en/py/latest/reference/libtmux-options-untypedoptionsdict/)
  * [convert​\_value](https://libtmux.org/en/py/latest/reference/libtmux-options-convert_value/)
  * [convert​\_values](https://libtmux.org/en/py/latest/reference/libtmux-options-convert_values/)
  * [explode​\_arrays](https://libtmux.org/en/py/latest/reference/libtmux-options-explode_arrays/)
  * [explode​\_complex](https://libtmux.org/en/py/latest/reference/libtmux-options-explode_complex/)
  * [handle​\_option​\_error](https://libtmux.org/en/py/latest/reference/libtmux-options-handle_option_error/)
  * [parse​\_options​\_to​\_dict](https://libtmux.org/en/py/latest/reference/libtmux-options-parse_options_to_dict/)

* libtmux.pane 1

  * [logger](https://libtmux.org/en/py/latest/reference/libtmux-pane-logger/)

* libtmux.pytest\_plugin 14

  * [logger](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-logger/)
  * [USING​\_ZSH](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-using_zsh/)
  * [\_reap​\_test​\_server](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-_reap_test_server/)
  * [clear​\_env](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-clear_env/)
  * [config​\_file](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-config_file/)
  * [control​\_mode](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-control_mode/)
  * [home​\_path](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-home_path/)
  * [home​\_user​\_name](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-home_user_name/)
  * [server](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-server/)
  * [session](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-session/)
  * [session​\_params](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-session_params/)
  * [Test​Server](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-testserver/)
  * [user​\_path](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-user_path/)
  * [zshrc](https://libtmux.org/en/py/latest/reference/libtmux-pytest_plugin-zshrc/)

* libtmux.server 3

  * [logger](https://libtmux.org/en/py/latest/reference/libtmux-server-logger/)
  * [\_fetch​\_or​\_empty](https://libtmux.org/en/py/latest/reference/libtmux-server-_fetch_or_empty/)
  * [\_is​\_daemon​\_not​\_up​\_error](https://libtmux.org/en/py/latest/reference/libtmux-server-_is_daemon_not_up_error/)

* libtmux.session 1

  * [logger](https://libtmux.org/en/py/latest/reference/libtmux-session-logger/)

* libtmux.window 1

  * [logger](https://libtmux.org/en/py/latest/reference/libtmux-window-logger/)

* tmuxp.cli 7

  * [CLINamespace](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-clinamespace/)
  * [CLI​\_DESCRIPTION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-cli_description/)
  * [ns](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-ns/)
  * [cli](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-cli/)
  * [create​\_parser](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-create_parser/)
  * [setup​\_logger](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-setup_logger/)
  * [startup](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-startup/)

* tmuxp.exc 17

  * [Active​Session​Missing​Workspace​Exception](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-activesessionmissingworkspaceexception/)
  * [Before​Load​Script​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-beforeloadscripterror/)
  * [Before​Load​Script​Not​Exists](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-beforeloadscriptnotexists/)
  * [Empty​Workspace​Exception](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-emptyworkspaceexception/)
  * [Invalid​Workspace​Builder](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-invalidworkspacebuilder/)
  * [Invalid​Workspace​Builder​Option](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-invalidworkspacebuilderoption/)
  * [Pane​Not​Found](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-panenotfound/)
  * [Session​Missing​Workspace​Exception](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-sessionmissingworkspaceexception/)
  * [Session​Not​Found](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-sessionnotfound/)
  * [Window​Not​Found](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-windownotfound/)
  * [Workspace​Builder​Import​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-workspacebuilderimporterror/)
  * [Workspace​Builder​Not​Found](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-workspacebuildernotfound/)
  * [Workspace​Builder​Path​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-workspacebuilderpatherror/)
  * [Tmuxp​Exception](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-tmuxpexception/)
  * [Tmuxp​Plugin​Exception](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-tmuxppluginexception/)
  * [Workspace​Builder​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-workspacebuildererror/)
  * [Workspace​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-workspaceerror/)

* tmuxp.log 8

  * [Debug​Log​Formatter](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-log-debuglogformatter/)
  * [Log​Formatter](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-log-logformatter/)
  * [Tmuxp​Logger​Adapter](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-log-tmuxploggeradapter/)
  * [LEVEL​\_COLORS](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-log-level_colors/)
  * [debug​\_log​\_template](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-log-debug_log_template/)
  * [set​\_style](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-log-set_style/)
  * [setup​\_log​\_file](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-log-setup_log_file/)
  * [tmuxp​\_echo](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-log-tmuxp_echo/)

* tmuxp.plugin 11

  * [Config](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-plugin-config/)
  * [Tmuxp​Plugin](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-plugin-tmuxpplugin/)
  * [DEFAULT​\_CONFIG](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-plugin-default_config/)
  * [LIBTMUX​\_MAX​\_VERSION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-plugin-libtmux_max_version/)
  * [LIBTMUX​\_MIN​\_VERSION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-plugin-libtmux_min_version/)
  * [TMUX​\_MAX​\_VERSION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-plugin-tmux_max_version/)
  * [TMUX​\_MIN​\_VERSION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-plugin-tmux_min_version/)
  * [TMUXP​\_MAX​\_VERSION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-plugin-tmuxp_max_version/)
  * [TMUXP​\_MIN​\_VERSION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-plugin-tmuxp_min_version/)
  * [setup​\_plugin​\_config](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-plugin-setup_plugin_config/)
  * [validate​\_plugin​\_config](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-plugin-validate_plugin_config/)

* tmuxp.shell 13

  * [detect​\_best​\_shell](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-shell-detect_best_shell/)
  * [get​\_bpython](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-shell-get_bpython/)
  * [get​\_code](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-shell-get_code/)
  * [get​\_ipython](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-shell-get_ipython/)
  * [get​\_ipython​\_arguments](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-shell-get_ipython_arguments/)
  * [get​\_launch​\_args](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-shell-get_launch_args/)
  * [get​\_ptipython](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-shell-get_ptipython/)
  * [get​\_ptpython](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-shell-get_ptpython/)
  * [has​\_bpython](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-shell-has_bpython/)
  * [has​\_ipython](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-shell-has_ipython/)
  * [has​\_ptipython](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-shell-has_ptipython/)
  * [has​\_ptpython](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-shell-has_ptpython/)
  * [launch](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-shell-launch/)

* tmuxp.types 1

  * [Str​Path](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-types-strpath/)

* tmuxp.util 7

  * [PY2](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-util-py2/)
  * [get​\_current​\_pane](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-util-get_current_pane/)
  * [get​\_pane](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-util-get_pane/)
  * [get​\_session](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-util-get_session/)
  * [get​\_window](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-util-get_window/)
  * [oh​\_my​\_zsh​\_auto​\_title](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-util-oh_my_zsh_auto_title/)
  * [run​\_before​\_script](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-util-run_before_script/)

* libtmux\_mcp.prompts.recipes 4

  * [build​\_dev​\_workspace](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-prompts-recipes-build_dev_workspace/)
  * [diagnose​\_failing​\_pane](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-prompts-recipes-diagnose_failing_pane/)
  * [interrupt​\_gracefully](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-prompts-recipes-interrupt_gracefully/)
  * [run​\_and​\_wait](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-prompts-recipes-run_and_wait/)

* libtmux\_mcp.resources.hierarchy 2

  * [register](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-resources-hierarchy-register/)
  * [register​\_completions](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-resources-hierarchy-register_completions/)

* libtmux\_mcp.tools.batch\_tools 3

  * [MAX​\_BATCH​\_OPERATIONS](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-batch_tools-max_batch_operations/)
  * [call​\_read​\_tools​\_batch](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-batch_tools-call_read_tools_batch/)
  * [register](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-batch_tools-register/)

* libtmux\_mcp.tools.buffer\_tools 6

  * [SHOW​\_BUFFER​\_DEFAULT​\_MAX​\_LINES](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-buffer_tools-show_buffer_default_max_lines/)
  * [delete​\_buffer](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-buffer_tools-delete_buffer/)
  * [load​\_buffer](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-buffer_tools-load_buffer/)
  * [paste​\_buffer](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-buffer_tools-paste_buffer/)
  * [register](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-buffer_tools-register/)
  * [show​\_buffer](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-buffer_tools-show_buffer/)

* libtmux\_mcp.tools.env\_tools 3

  * [register](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-env_tools-register/)
  * [set​\_environment](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-env_tools-set_environment/)
  * [show​\_environment](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-env_tools-show_environment/)

* libtmux\_mcp.tools.hook\_tools 3

  * [register](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-hook_tools-register/)
  * [show​\_hook](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-hook_tools-show_hook/)
  * [show​\_hooks](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-hook_tools-show_hooks/)

* libtmux\_mcp.tools.option\_tools 3

  * [register](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-option_tools-register/)
  * [set​\_option](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-option_tools-set_option/)
  * [show​\_option](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-option_tools-show_option/)

* libtmux\_mcp.tools.pane\_tools 23

  * [capture​\_pane](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-capture_pane/)
  * [capture​\_since](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-capture_since/)
  * [clear​\_pane](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-clear_pane/)
  * [display​\_message](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-display_message/)
  * [enter​\_copy​\_mode](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-enter_copy_mode/)
  * [exit​\_copy​\_mode](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-exit_copy_mode/)
  * [find​\_pane​\_by​\_position](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-find_pane_by_position/)
  * [get​\_pane​\_info](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-get_pane_info/)
  * [kill​\_pane](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-kill_pane/)
  * [paste​\_text](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-paste_text/)
  * [pipe​\_pane](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-pipe_pane/)
  * [register](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-register/)
  * [resize​\_pane](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-resize_pane/)
  * [respawn​\_pane](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-respawn_pane/)
  * [run​\_command](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-run_command/)
  * [search​\_panes](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-search_panes/)
  * [select​\_pane](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-select_pane/)
  * [send​\_keys](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-send_keys/)
  * [send​\_keys​\_batch](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-send_keys_batch/)
  * [set​\_pane​\_title](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-set_pane_title/)
  * [snapshot​\_pane](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-snapshot_pane/)
  * [swap​\_pane](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-swap_pane/)
  * [wait​\_for​\_text](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-wait_for_text/)

* libtmux\_mcp.tools.server\_tools 7

  * [SOCKET​\_NAME​\_EXEMPT](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-server_tools-socket_name_exempt/)
  * [create​\_session](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-server_tools-create_session/)
  * [get​\_server​\_info](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-server_tools-get_server_info/)
  * [kill​\_server](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-server_tools-kill_server/)
  * [list​\_servers](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-server_tools-list_servers/)
  * [list​\_sessions](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-server_tools-list_sessions/)
  * [register](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-server_tools-register/)

* libtmux\_mcp.tools.session\_tools 7

  * [create​\_window](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-session_tools-create_window/)
  * [get​\_session​\_info](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-session_tools-get_session_info/)
  * [kill​\_session](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-session_tools-kill_session/)
  * [list​\_windows](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-session_tools-list_windows/)
  * [register](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-session_tools-register/)
  * [rename​\_session](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-session_tools-rename_session/)
  * [select​\_window](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-session_tools-select_window/)

* libtmux\_mcp.tools.wait\_for\_tools 3

  * [register](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-wait_for_tools-register/)
  * [signal​\_channel](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-wait_for_tools-signal_channel/)
  * [wait​\_for​\_channel](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-wait_for_tools-wait_for_channel/)

* libtmux\_mcp.tools.window\_tools 9

  * [get​\_window​\_info](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-window_tools-get_window_info/)
  * [kill​\_window](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-window_tools-kill_window/)
  * [list​\_panes](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-window_tools-list_panes/)
  * [move​\_window](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-window_tools-move_window/)
  * [register](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-window_tools-register/)
  * [rename​\_window](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-window_tools-rename_window/)
  * [resize​\_window](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-window_tools-resize_window/)
  * [select​\_layout](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-window_tools-select_layout/)
  * [split​\_window](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-window_tools-split_window/)

* libtmux.\_internal.constants 9

  * [Hooks](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-hooks/)
  * [Options](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-options/)
  * [Pane​Options](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-paneoptions/)
  * [Server​Options](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-serveroptions/)
  * [Session​Options](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-sessionoptions/)
  * [Window​Options](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-windowoptions/)
  * [Hook​Array](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-hookarray/)
  * [T](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-t/)
  * [Terminal​Features](https://libtmux.org/en/py/latest/reference/libtmux-_internal-constants-terminalfeatures/)

* libtmux.\_internal.control\_mode 1

  * [Control​Mode](https://libtmux.org/en/py/latest/reference/libtmux-_internal-control_mode-controlmode/)

* libtmux.\_internal.dataclasses 1

  * [Skip​Default​Fields​Repr​Mixin](https://libtmux.org/en/py/latest/reference/libtmux-_internal-dataclasses-skipdefaultfieldsreprmixin/)

* libtmux.\_internal.env 5

  * [TMUX](https://libtmux.org/en/py/latest/reference/libtmux-_internal-env-tmux/)
  * [TMUX​\_PANE](https://libtmux.org/en/py/latest/reference/libtmux-_internal-env-tmux_pane/)
  * [pane​\_id​\_from​\_env](https://libtmux.org/en/py/latest/reference/libtmux-_internal-env-pane_id_from_env/)
  * [resolve​\_env](https://libtmux.org/en/py/latest/reference/libtmux-_internal-env-resolve_env/)
  * [socket​\_path​\_from​\_env](https://libtmux.org/en/py/latest/reference/libtmux-_internal-env-socket_path_from_env/)

* libtmux.\_internal.query\_list 21

  * [Query​List](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-querylist/)
  * [Op​Not​Found](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-opnotfound/)
  * [PKRequired​Exception](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-pkrequiredexception/)
  * [logger](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-logger/)
  * [LOOKUP​\_NAME​\_MAP](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-lookup_name_map/)
  * [no​\_arg](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-no_arg/)
  * [T](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-t/)
  * [keygetter](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-keygetter/)
  * [lookup​\_contains](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-lookup_contains/)
  * [lookup​\_endswith](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-lookup_endswith/)
  * [lookup​\_exact](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-lookup_exact/)
  * [lookup​\_icontains](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-lookup_icontains/)
  * [lookup​\_iendswith](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-lookup_iendswith/)
  * [lookup​\_iexact](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-lookup_iexact/)
  * [lookup​\_in](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-lookup_in/)
  * [lookup​\_iregex](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-lookup_iregex/)
  * [lookup​\_istartswith](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-lookup_istartswith/)
  * [lookup​\_nin](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-lookup_nin/)
  * [lookup​\_regex](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-lookup_regex/)
  * [lookup​\_startswith](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-lookup_startswith/)
  * [parse​\_lookup](https://libtmux.org/en/py/latest/reference/libtmux-_internal-query_list-parse_lookup/)

* libtmux.\_internal.sparse\_array 4

  * [Sparse​Array](https://libtmux.org/en/py/latest/reference/libtmux-_internal-sparse_array-sparsearray/)
  * [Hook​Array](https://libtmux.org/en/py/latest/reference/libtmux-_internal-sparse_array-hookarray/)
  * [T](https://libtmux.org/en/py/latest/reference/libtmux-_internal-sparse_array-t/)
  * [is​\_sparse​\_array​\_list](https://libtmux.org/en/py/latest/reference/libtmux-_internal-sparse_array-is_sparse_array_list/)

* libtmux.\_internal.types 1

  * [Str​Path](https://libtmux.org/en/py/latest/reference/libtmux-_internal-types-strpath/)

* tmuxp.cli.convert 4

  * [Convert​Unknown​File​Type](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-convert-convertunknownfiletype/)
  * [CONVERT​\_DESCRIPTION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-convert-convert_description/)
  * [command​\_convert](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-convert-command_convert/)
  * [create​\_convert​\_subparser](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-convert-create_convert_subparser/)

* tmuxp.cli.debug\_info 5

  * [CLIDebug​Info​Namespace](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-debug_info-clidebuginfonamespace/)
  * [DEBUG​\_INFO​\_DESCRIPTION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-debug_info-debug_info_description/)
  * [tmuxp​\_path](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-debug_info-tmuxp_path/)
  * [command​\_debug​\_info](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-debug_info-command_debug_info/)
  * [create​\_debug​\_info​\_subparser](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-debug_info-create_debug_info_subparser/)

* tmuxp.cli.edit 3

  * [EDIT​\_DESCRIPTION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-edit-edit_description/)
  * [command​\_edit](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-edit-command_edit/)
  * [create​\_edit​\_subparser](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-edit-create_edit_subparser/)

* tmuxp.cli.freeze 4

  * [CLIFreeze​Namespace](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-freeze-clifreezenamespace/)
  * [FREEZE​\_DESCRIPTION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-freeze-freeze_description/)
  * [command​\_freeze](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-freeze-command_freeze/)
  * [create​\_freeze​\_subparser](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-freeze-create_freeze_subparser/)

* tmuxp.cli.import\_config 9

  * [Import​Config​Fn](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-import_config-importconfigfn/)
  * [IMPORT​\_DESCRIPTION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-import_config-import_description/)
  * [command​\_import](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-import_config-command_import/)
  * [command​\_import​\_teamocil](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-import_config-command_import_teamocil/)
  * [command​\_import​\_tmuxinator](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-import_config-command_import_tmuxinator/)
  * [create​\_import​\_subparser](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-import_config-create_import_subparser/)
  * [get​\_teamocil​\_dir](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-import_config-get_teamocil_dir/)
  * [get​\_tmuxinator​\_dir](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-import_config-get_tmuxinator_dir/)
  * [import​\_config](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-import_config-import_config/)

* tmuxp.cli.load 6

  * [CLILoad​Namespace](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-load-cliloadnamespace/)
  * [LOAD​\_DESCRIPTION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-load-load_description/)
  * [command​\_load](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-load-command_load/)
  * [create​\_load​\_subparser](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-load-create_load_subparser/)
  * [load​\_plugins](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-load-load_plugins/)
  * [load​\_workspace](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-load-load_workspace/)

* tmuxp.cli.ls 5

  * [CLILs​Namespace](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-ls-clilsnamespace/)
  * [Workspace​Info](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-ls-workspaceinfo/)
  * [LS​\_DESCRIPTION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-ls-ls_description/)
  * [command​\_ls](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-ls-command_ls/)
  * [create​\_ls​\_subparser](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-ls-create_ls_subparser/)

* tmuxp.cli.search 19

  * [CLISearch​Namespace](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-clisearchnamespace/)
  * [Search​Pattern](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-searchpattern/)
  * [Search​Token](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-searchtoken/)
  * [Workspace​Fields](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-workspacefields/)
  * [Workspace​Search​Result](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-workspacesearchresult/)
  * [Invalid​Field​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-invalidfielderror/)
  * [DEFAULT​\_FIELDS](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-default_fields/)
  * [FIELD​\_ALIASES](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-field_aliases/)
  * [SEARCH​\_DESCRIPTION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-search_description/)
  * [VALID​\_FIELDS](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-valid_fields/)
  * [command​\_search](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-command_search/)
  * [compile​\_search​\_patterns](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-compile_search_patterns/)
  * [create​\_search​\_subparser](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-create_search_subparser/)
  * [evaluate​\_match](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-evaluate_match/)
  * [extract​\_workspace​\_fields](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-extract_workspace_fields/)
  * [find​\_search​\_matches](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-find_search_matches/)
  * [highlight​\_matches](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-highlight_matches/)
  * [normalize​\_fields](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-normalize_fields/)
  * [parse​\_query​\_terms](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-search-parse_query_terms/)

* tmuxp.cli.shell 4

  * [CLIShell​Namespace](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-shell-clishellnamespace/)
  * [SHELL​\_DESCRIPTION](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-shell-shell_description/)
  * [command​\_shell](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-shell-command_shell/)
  * [create​\_shell​\_subparser](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-shell-create_shell_subparser/)

* tmuxp.cli.utils 4

  * [prompt](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-utils-prompt/)
  * [prompt​\_bool](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-utils-prompt_bool/)
  * [prompt​\_choices](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-utils-prompt_choices/)
  * [prompt​\_yes​\_no](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-cli-utils-prompt_yes_no/)

* tmuxp.workspace.builder 10

  * [Classic​Workspace​Builder](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-builder-classicworkspacebuilder/)
  * [Workspace​Builder​Protocol](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-builder-workspacebuilderprotocol/)
  * [WORKSPACE​\_BUILDERS​\_GROUP](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-builder-workspace_builders_group/)
  * [Workspace​Builder](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-builder-workspacebuilder/)
  * [available​\_builders](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-builder-available_builders/)
  * [get​\_default​\_columns](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-builder-get_default_columns/)
  * [get​\_default​\_rows](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-builder-get_default_rows/)
  * [prepended​\_sys​\_path](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-builder-prepended_sys_path/)
  * [resolve​\_builder​\_class](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-builder-resolve_builder_class/)
  * [resolve​\_builder​\_paths](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-builder-resolve_builder_paths/)

* tmuxp.workspace.constants 1

  * [VALID​\_WORKSPACE​\_DIR​\_FILE​\_EXTENSIONS](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-constants-valid_workspace_dir_file_extensions/)

* tmuxp.workspace.finders 9

  * [LOCAL​\_WORKSPACE​\_FILES](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-finders-local_workspace_files/)
  * [find​\_local​\_workspace​\_files](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-finders-find_local_workspace_files/)
  * [find​\_workspace​\_file](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-finders-find_workspace_file/)
  * [get​\_workspace​\_dir](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-finders-get_workspace_dir/)
  * [get​\_workspace​\_dir​\_candidates](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-finders-get_workspace_dir_candidates/)
  * [in​\_cwd](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-finders-in_cwd/)
  * [in​\_dir](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-finders-in_dir/)
  * [is​\_pure​\_name](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-finders-is_pure_name/)
  * [is​\_workspace​\_file](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-finders-is_workspace_file/)

* tmuxp.workspace.freezer 2

  * [freeze](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-freezer-freeze/)
  * [inline](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-freezer-inline/)

* tmuxp.workspace.importers 2

  * [import​\_teamocil](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-importers-import_teamocil/)
  * [import​\_tmuxinator](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-importers-import_tmuxinator/)

* tmuxp.workspace.loader 4

  * [expand](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-loader-expand/)
  * [expand​\_cmd](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-loader-expand_cmd/)
  * [expandshell](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-loader-expandshell/)
  * [trickle](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-loader-trickle/)

* tmuxp.workspace.options 4

  * [Pane​Readiness](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-options-panereadiness/)
  * [Workspace​Builder​Options](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-options-workspacebuilderoptions/)
  * [resolve​\_session​\_shell](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-options-resolve_session_shell/)
  * [shell​\_is​\_zsh](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-options-shell_is_zsh/)

* tmuxp.workspace.validation 6

  * [Invalid​Plugins​Validation​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-validation-invalidpluginsvalidationerror/)
  * [Session​Name​Missing​Validation​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-validation-sessionnamemissingvalidationerror/)
  * [Window​List​Missing​Validation​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-validation-windowlistmissingvalidationerror/)
  * [Window​Name​Missing​Validation​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-validation-windownamemissingvalidationerror/)
  * [Schema​Validation​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-validation-schemavalidationerror/)
  * [validate​\_schema](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-validation-validate_schema/)

* libtmux\_mcp.tools.pane\_tools.capture\_since 2

  * [CAPTURE​\_SINCE​\_DEFAULT​\_MAX​\_BYTES](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-capture_since-capture_since_default_max_bytes/)
  * [CAPTURE​\_SINCE​\_DEFAULT​\_MAX​\_LINES](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-capture_since-capture_since_default_max_lines/)

* libtmux\_mcp.tools.pane\_tools.io 1

  * [CAPTURE​\_DEFAULT​\_MAX​\_LINES](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-io-capture_default_max_lines/)

* libtmux\_mcp.tools.pane\_tools.lifecycle 1

  * [Pane​Corner](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-lifecycle-panecorner/)

* libtmux\_mcp.tools.pane\_tools.search 4

  * [SEARCH​\_DEFAULT​\_LIMIT](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-search-search_default_limit/)
  * [SEARCH​\_DEFAULT​\_MAX​\_LINES​\_PER​\_PANE](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-search-search_default_max_lines_per_pane/)
  * [SEARCH​\_MATCH​\_MAX​\_SECONDS](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-search-search_match_max_seconds/)
  * [SEARCH​\_MAX​\_PATTERN​\_LENGTH](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-search-search_max_pattern_length/)

* libtmux\_mcp.tools.pane\_tools.state 2

  * [HISTORY​\_LIMIT​\_FORMAT](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-state-history_limit_format/)
  * [PANE​\_STATE​\_FORMAT](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-state-pane_state_format/)

* tmuxp.workspace.builder.classic 2

  * [COLUMNS​\_FALLBACK](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-builder-classic-columns_fallback/)
  * [ROWS​\_FALLBACK](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-builder-classic-rows_fallback/)

* Types 7

  * [\_Default​Option​Scope](https://libtmux.org/en/py/latest/reference/libtmux-constants-_defaultoptionscope/)
  * [\_Tmux​Version​Unavailable](https://libtmux.org/en/py/latest/reference/libtmux-common-_tmuxversionunavailable/)
  * [Schema​Validation​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-validation-schemavalidationerror/)
  * [Tmuxp​Exception](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-tmuxpexception/)
  * [Tmuxp​Plugin​Exception](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-tmuxppluginexception/)
  * [Workspace​Builder​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-workspacebuildererror/)
  * [Workspace​Error](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-exc-workspaceerror/)
