diff options
| author | Igor Soarez <igor@soarez.org> | 2026-10-20 13:59:29 +0300 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-10-20 13:59:29 +0300 |
| commit | 6bccc5f786c479a335c55ad83487e077195cff44 (patch) | |
| tree | 7777eb50a5e264719a92bd34c653aba9edd133c5 /crates/dinggerd/src/tmux.rs | |
| parent | 3731a80384f5e2b7d3343eb3e4999f626bbc7f91 (diff) | |
menu rows lead with the agent's session name; harness and place move below
herdr's sidebar shows the session name in place of the harness label (via
the user's herdr-session-name extension). dingger reads it from the title
pi already sets ("π - <name> - <dir>"); other agents use herdr's
terminal_title_stripped rule, and claude's default "Claude Code" title or
tmux's host-name title count as no name. the daemon stores it as
@agent_name for every surface.
menu rows: colored status symbol + name as the title (the harness, dimmed,
only when unnamed), and a native subtitle "session · window · harness",
plus how long done/blocked agents have been waiting; one separator between
agents waiting for you and the rest. dingger status shows the same.
Diffstat (limited to 'crates/dinggerd/src/tmux.rs')
| -rw-r--r-- | crates/dinggerd/src/tmux.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/crates/dinggerd/src/tmux.rs b/crates/dinggerd/src/tmux.rs index 326eda9..6189c4b 100644 --- a/crates/dinggerd/src/tmux.rs +++ b/crates/dinggerd/src/tmux.rs @@ -12,6 +12,8 @@ pub struct Pane { pub display_target: String, /// Last OSC title the pane's application set, from `#{pane_title}`. pub pane_title: String, + /// Working directory of the pane's foreground process. + pub cwd: String, pub dead: bool, /// The pane's window is the current window of its session. pub window_active: bool, @@ -24,6 +26,7 @@ pub struct Pane { pub written_ack: String, pub written_since: String, pub written_hook: String, + pub written_name: String, } impl Pane { @@ -73,14 +76,16 @@ pub fn list_panes() -> Result<Vec<Pane>, String> { "#{@dingger_hook}\t", "#{session_name}:#{window_name}\t", "#{window_panes}\t", - "#{pane_index}", + "#{pane_index}\t", + "#{pane_current_path}\t", + "#{@agent_name}", ); let out = run_tmux(&["list-panes", "-a", "-F", format])?; let mut panes = Vec::new(); let mut process_tree = None; for line in out.lines() { let fields: Vec<&str> = line.split('\t').collect(); - if fields.len() < 16 { + if fields.len() < 18 { continue; } let current_command = fields[1]; @@ -106,6 +111,7 @@ pub fn list_panes() -> Result<Vec<Pane>, String> { pane_id: fields[0].to_string(), display_target, pane_title: fields[2].to_string(), + cwd: fields[16].to_string(), dead: fields[3] == "1", window_active: fields[4] == "1", session_attached: fields[5] != "0", @@ -115,6 +121,7 @@ pub fn list_panes() -> Result<Vec<Pane>, String> { written_ack: fields[10].to_string(), written_since: fields[11].to_string(), written_hook: fields[12].to_string(), + written_name: fields[17].to_string(), }); } Ok(panes) |
