I support a large number of Unix-like servers and therefore support a script called tmux-rebuildthat I use to rebuild all tmux sessions and windows with SSH links to each server.
I have tmux to show the window name in red with an exclamation mark in the status bar when a bell symbol is printed in this window. This is very convenient for programs such as irssiwarning me when I have messages in another window.
I also have mine $PS1configured on each server to print a terminal bell at the end of each invitation. This is useful because if I run a long job in one window and switch to another, I can immediately see when it will end, because when my invitation is written to the screen after the job is completed, tmux makes the window name red, an exclamation mark. This is great for my workflow.
However, this causes a slight problem with the rebuild script mentioned above, because when I run tmux after it starts, every window in each session is marked in red since the first prompt is printed on the screen. This makes the function useless until I look in every window, and there is something like 40-50 of them.
Is there something I can add to my script that will clear all warnings from sessions and windows after they are created? I do not mind using kludge if necessary.
user493111
source
share