interactive: Host/View entry menu, clipboard copy, player picker

Bare `pixelpass` now opens a dialoguer-driven Host/View menu instead of
going straight to host mode. Host path copies the ticket to the system
clipboard via arboard with silent print-only fallback. View path
prompts for the ticket, then after the local listener binds prompts
mpv-vs-VLC and spawns it detached (setsid + null stdio) so the player
survives pixelpass exiting.

Headless invocations (`pixelpass <ticket>`, `pixelpass --repair`)
unchanged. Per spec at ~/Documents/pixelpass-interactive-mode-spec.md.
This commit is contained in:
2026-05-18 15:46:57 -04:00
parent 4cab9f6b20
commit bb437a73cf
9 changed files with 410 additions and 15 deletions
+4 -3
View File
@@ -1,6 +1,7 @@
mod cli;
mod common;
mod host;
mod interactive;
mod repair;
mod viewer;
@@ -24,12 +25,12 @@ async fn main() -> Result<()> {
let ticket: EndpointTicket = s.parse().map_err(|e| {
anyhow::anyhow!(
"argument doesn't look like a pixelpass ticket ({e}).\n\
Run with no arguments to host, or pass a ticket to view."
Run with no arguments for the interactive menu, or pass a ticket to view."
)
})?;
viewer::run(ticket, cli.into_viewer_opts()).await
viewer::run(ticket, cli.into_viewer_opts(false)).await
}
None => host::run(cli.into_host_opts()).await,
None => interactive::run(cli).await,
}
}