Query window and tab state from the CLI
#868 covers sending commands to a running instance. This is the other half: reading state back.
rio msg list --jsonWhat I'd want back is per window the screen position, size in columns and rows, and whether it's maximized, and per tab the working directory and title.
wezterm has rich support for this. wezterm cli list --format json returns every window, tab and pane with its working directory and dimensions, and wezterm cli spawn adds a tab to a running window. Something equivalent in Rio is what I'm after.
For context, I'm writing a tool that saves which terminal windows I have open and reopens them after a reboot (it also restores my claude sessions). Currently only works on windows but hoping to do the same on Linux. For Rio I can get the pid from the process tree and the window rect from the OS, but nothing tells me what tabs exist or which directory each one is in, so I can only restore one window per process.
Terminal screen position is #951. It's gone stale.
Presumably this could sit on the same socket as #868.
Source: raphamorim/rio