Skip to main content

Module cmd

Module cmd 

Source
Expand description

Launch arguments and the IPC wire format for controlling a running panel.

A tree-space invocation parses into a Command:

  • tree-space → toggle every dock together
  • tree-space --side right → toggle just the right dock
  • tree-space <dir>... → open the given directory (pane) root(s)
  • tree-space --side left <dir>... → open the given root(s) in the left dock
  • tree-space <file>... → reveal each file in its parent directory
  • tree-space --select <path> → reveal an explicit path (file or dir)
  • tree-space --hidden → launch/keep hidden (never shows)
  • tree-space --width 420 → set the panel width (absolute pixels)
  • tree-space --width +40 → widen the running panel by 40px (-40 narrows)

If a tree-space server is already running, the new invocation serializes its Command to the instance socket and exits; the server feeds it back to the app via crate::ui::app::AppMsg::LaunchRequest. The wire format is deliberately simple: side=/root=/hidden=/width= tokens joined with NULs (impossible in Unix path components) and terminated by a newline.

Structs§

Command
What a tree-space invocation wants the panel to do.

Enums§

WidthArg
The value of a --width argument: an absolute width or a signed delta.