Liking cljdoc? Tell your friends :D

hive-tmux.python.tmux-ops

High-level libtmux operations — server/session/pane lifecycle.

Topology: One tmux session named 'hive' (configurable). Each ling gets its own window (full-width, not a split).

All operations are synchronous (<10ms) — no asyncio needed.

High-level libtmux operations — server/session/pane lifecycle.

Topology: One tmux session named 'hive' (configurable).
Each ling gets its own window (full-width, not a split).

All operations are synchronous (<10ms) — no asyncio needed.
raw docstring

capture-outputclj

(capture-output pane)
(capture-output pane {:keys [lines] :or {lines 50}})

Capture the current pane content (last N lines).

Arguments: pane - libtmux pane object opts - {:lines int} (default 50)

Returns: Vector of strings (lines).

Capture the current pane content (last N lines).

Arguments:
  pane - libtmux pane object
  opts - {:lines int} (default 50)

Returns:
  Vector of strings (lines).
sourceraw docstring

create-pane!clj

(create-pane! {:keys [ling-id cwd session-name]
               :or {session-name default-session-name}})

Create a new window with a pane for a ling. Each ling gets its own window (full-width).

Arguments: opts - {:ling-id str, :cwd str, :session-name str}

Returns: {:pane-id str, :window-id str, :pane obj, :window obj}

Create a new window with a pane for a ling.
Each ling gets its own window (full-width).

Arguments:
  opts - {:ling-id str, :cwd str, :session-name str}

Returns:
  {:pane-id str, :window-id str, :pane obj, :window obj}
sourceraw docstring

ensure-server!clj

(ensure-server!)

Connect to the running tmux server. Cached singleton. Returns the libtmux Server object or throws with actionable message.

Connect to the running tmux server. Cached singleton.
Returns the libtmux Server object or throws with actionable message.
sourceraw docstring

ensure-session!clj

(ensure-session!)
(ensure-session! {:keys [session-name] :or {session-name default-session-name}})

Get or create the hive tmux session. Falls back to tmux new-session -d shell command when libtmux's new_session fails (e.g. 'not a terminal' in headless/nREPL contexts). Returns the session object.

Get or create the hive tmux session.
Falls back to `tmux new-session -d` shell command when libtmux's
new_session fails (e.g. 'not a terminal' in headless/nREPL contexts).
Returns the session object.
sourceraw docstring

kill-pane!clj

(kill-pane! pane)

Kill a tmux pane (and its window if it's the only pane).

Arguments: pane - libtmux pane object

Kill a tmux pane (and its window if it's the only pane).

Arguments:
  pane - libtmux pane object
sourceraw docstring

pane-alive?clj

(pane-alive? pane-id)

Check if a pane still exists on the tmux server.

Arguments: pane-id - string pane id (e.g. "%42")

Returns: true if pane exists, false otherwise.

Check if a pane still exists on the tmux server.

Arguments:
  pane-id - string pane id (e.g. "%42")

Returns:
  true if pane exists, false otherwise.
sourceraw docstring

reset-server!clj

(reset-server!)

Clear cached server. For testing.

Clear cached server. For testing.
sourceraw docstring

send-interrupt!clj

(send-interrupt! pane)

Send C-c interrupt to a tmux pane.

Arguments: pane - libtmux pane object

Send C-c interrupt to a tmux pane.

Arguments:
  pane - libtmux pane object
sourceraw docstring

send-keys!clj

(send-keys! pane text)
(send-keys! pane text {:keys [enter?] :or {enter? true}})

Send keys to a tmux pane.

Arguments: pane - libtmux pane object text - string to send opts - {:enter? bool} (default true — press Enter after text)

Send keys to a tmux pane.

Arguments:
  pane - libtmux pane object
  text - string to send
  opts - {:enter? bool} (default true — press Enter after text)
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close