I wrote an addon to tmux, tmux-gitbar, it adds to tmux status bar some information about the current Git working tree (name of local and remote branch, working tree is clean?, etc.). So basically it's modifying the content of tmux status bar.
I'm currently writing a suite of automated tests and I'd like to capture the actual content of the tmux status bar in order to perform some checks.
I tried with the unix
script tool, also with
ttyrec, both used to realize terminal session recordings. They grab the whole terminal content, but not the status bar.
How would I do that?
In fact, I was able to capture tmux status bar using both
ttyrec. To do so I only had to run them before starting tmux. As these tools grab current terminal, they are not aware of the parent terminal in which you started tmux. Starting them before
tmux made them be see the terminal rows and cols in which tmux creates its status bar.
I'm still looking for another solution though, as I do not find it really stable to parse the binaries produced by
ttyrec as part of my integration test suite.
However, one tool looks promising for the task: a vt100 emulator library written in python, but I'm still open to suggestions/solutions.