Skip to content
scturtlePublic
forked from herdrdev/herdr

About

poor man's tmux

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

ht

A personal, Linux-only fork of Herdr, using herdr-core as its only runtime and reusing the original terminal UI.

  • Workspaces, tabs, split panes, keyboard and mouse controls.
  • Multiple clients share running programs while keeping independent focus.
  • The last interacting client controls a pane's size; other clients follow it.
  • Detaching leaves programs running. Copy, search and local diagnostics are built in.

Build

A working installation needs two binaries, built independently. The build recipes target static musl on the host architecture (x86_64 or aarch64), so neither binary requires glibc at runtime.

Component Sources Zig Output
Client (ht) this workspace + libghostty-vt vt-1.0.0 0.17.0 target/<arch>-unknown-linux-musl/release/ht
Core (hc) herdr-core 0.16.0 .local/hc/bin/herdr-core

1. Prepare dependencies

Install Rust 1.100.0 with clippy and rustfmt through rustup (rust-toolchain.toml pins the channel), a libclang shared library for bindgen (LIBCLANG_PATH if it is not auto-detected), and just, which drives every build recipe, plus cargo-nextest for just test, with cargo install into ~/.local/bin kept on PATH. From the repository root, add the musl standard library for the pinned toolchain:

rustup target add "$(uname -m)-unknown-linux-musl"

2. Prepare the two Zig toolchains

The client and Core use different Zig versions because they vendor different Ghostty sources. Install both toolchains side by side: just sets ZIG to .local/toolchain/zig/0.17.0/zig for the client, so no shell export is needed. Core's build ignores ZIG and always uses .local/toolchain/zig/0.16.0/zig.

3. Build the client and Core

just build        # client: fetch verified libghostty-vt sources, then build ht
just build-core   # Core: fetch, patch, build and atomically publish herdr-core

When invoking Cargo directly for the client, pass --target "$(uname -m)-unknown-linux-musl" to select the same target.

4. Install (optional)

just install builds both components and symlinks ht and herdr-core into ~/.local/bin.

Working directories

Keep toolchain/ (tools plus zig/<version>/), core-tui/ (trial runtime home and personal config). Everything else rebuilds on demand: cache/ and libghostty-vt/ for the client, hc/ for Core (downloads/, work/ and the published hc/bin/herdr-core). Client Cargo outputs stay in target/.

Run

HERDR_CORE_BIN="$PWD/.local/hc/bin/herdr-core" \
  "./target/$(uname -m)-unknown-linux-musl/release/ht"

With both binaries on PATH (via just install), launch with ht. It connects to the default Core or starts it if needed. The iOS App and ht can connect in either order: point the App at the same Linux user and Core endpoint (normally $XDG_RUNTIME_DIR/herdr-core/default.sock). Both use the herdr-app layout document. In an empty layout, press Ctrl+a then c to open the first shared tab.

Set HC_SOCKET to attach to an already-running Core at a specific socket. Recovery after a disconnect never starts Core. When a kept pane loses its program, Core 0.1.23 can restore the program's session via OSC 7577 if the program registered a resume command (as Pi does); otherwise it opens a shell.

Core state and runtime directories

  • XDG_STATE_HOME defaults to ~/.local/state; Core stores each session under $XDG_STATE_HOME/herdr-core/<session>/. If several machines share a home directory, use a distinct state home on each host (for example, XDG_STATE_HOME="$HOME/.local/state/$(hostname -s)") so their sessions do not share state.
  • Core sockets normally live under /run/user/<uid>/herdr-core/ on Linux. Set XDG_RUNTIME_DIR to a private, host-local directory other than /run/user/<uid> to put the sockets under $XDG_RUNTIME_DIR/herdr-core/ and start Core and its holders without systemd user services. This does not guarantee they will survive logout.

Configuration

Edit ~/.config/herdr/config.toml (or HERDR_CONFIG_PATH).

License

Apache License 2.0. Based on Herdr by its original contributors.

About

poor man's tmux

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages