Workspace ManagerstableAPI Reference

Choose documentation 3

stable

Current version

stable
English

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

tmuxp.workspace.finders.get_workspace_dir_candidates

tmuxp.workspace.finders.get_workspace_dir_candidates () → list[ dict[str, t.Any] ]

Return all candidate workspace directories with existence status.

Description#

Returns a list of all directories that tmuxp checks for workspaces, in priority order, with metadata about each.

The priority order is:

  1. TMUXP_CONFIGDIR environment variable (if set)
  2. XDG_CONFIG_HOME/tmuxp (if XDG_CONFIG_HOME set) OR ~/.config/tmuxp/
  3. ~/.tmuxp (legacy default)

Examples#

>>> candidates = get_workspace_dir_candidates()
>>> isinstance(candidates, list)
True
>>> all('path' in c and 'exists' in c for c in candidates)
True
Returns

list[dict[str, Any]] List of dicts with: - path: str (privacy-masked via PrivatePath) - source: str (e.g., "$TMUXP_CONFIGDIR", "$XDG_CONFIG_HOME/tmuxp", "Legacy") - exists: bool - workspace_count: int (0 if not exists) - active: bool (True if this is the directory get_workspace_dir() returns)

Esc

Type to search.

Reference preview Open reference