Alternative to Window-content.

28 views
Skip to first unread message

Imani S

unread,
Jul 31, 2022, 8:55:00 AM7/31/22
to tmux-...@googlegroups.com
Hi, 
I am trying to make a plugin in which I basically want to grab all the text content from a pane, do some stuff and repopulate it back to the pane. I want it to run as a callback everytime the pane-content changes. I was going through the man page and it seems there was a option for that before which was monitor-content, but that have been discontinued now. 
I want to know if there is any alternative monitor/hooks that I can use?

Thanks.

Nicholas Marriott

unread,
Jul 31, 2022, 5:33:45 PM7/31/22
to Imani S, tmux-users
IIRC monitor-content was to monitor for particular text.

You could probably use monitor-activity. Or you may be better using control mode.



--
You received this message because you are subscribed to the Google Groups "tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/CAHnzuoRcm5sAeZ40tQ_HLu%3Dsm%3DSXRnU%3DPOK8oAD0B%3DZY5n7FYg%40mail.gmail.com.

Imani S

unread,
Aug 1, 2022, 10:43:45 AM8/1/22
to tmux-users
Thanks. monitor-activity would work as per my testing. However I am in another pinch now. Is there a way to re render the whole text content from another shell/process? I just want to redraw the pane with some modifications, without it affecting the interactivity of that pane. Is that possible?

Nicholas Marriott

unread,
Aug 1, 2022, 10:50:58 AM8/1/22
to Imani S, tmux-users
No, there is no way to do this.


Imani S

unread,
Aug 6, 2022, 2:15:00 AM8/6/22
to tmux-users
Hmm. How much of the core would need to be changed to support this? Maybe I can try to fork and try to add this in. 
Can I get some tmux dev docs. The file structure is pretty much flat. A highlevel overview would be really nice. The main use case I want to have for this is basically meta syntax highlighting, something akin to what mobaxterm on windows provide. Going through log files/config files on plain vi on remote machines is hard on the eyes. Want to be able to add color based on simple regex. 
Making it part of tmux or a using a tmux plugin for this instead of relying on a terminal emulator providing it would make it emulator agnostic for the most part. But honestly I just want to add it in because it is going to be useful to me. 

Thanks.

Nicholas Marriott

unread,
Aug 6, 2022, 3:24:52 AM8/6/22
to Imani S, tmux-users
Someone wrote a patch for this years ago but never tried to submit it, someone else asked about it in this issue:





Reply all
Reply to author
Forward
0 new messages