Make tmux only track activity on status return

Is there a way to make tmux only show an action alert after the process returns?

Assuming activity monitoring is enabled, by default it works to alert you when something in the window changes. This is inherently useless (and incredibly annoying) if you are using any lengthy process that spills out progress or any other kind of output along the way.

Imagining that I am running these commands with --quiet or such is NOT what I am looking for. In many cases, I want to be able to test them (not to mention they haven't crashed).

I don't really hope so as I read the docs and the options for monitoring activity are pretty subtle. Does anyone know of some other hack to make this work?

+3


source to share


1 answer


I am trying to do the same too. The monitoring-content and monitoring-silence options can be useful.

  • If the process continues to print something to the window, use the monitor silence to track the extended silence.

setw -g monitor-silence INTERVAL

The window will be highlighted if it was disabled for INTERVAL seconds.

  1. If the process never prints anything, or prints only a few times over a very long period of time, use Content Monitor to monitor the specified content. for example


setw -g monitor-content 'Process exited'

Then run your command like this

clear; YOUR_COMMAND; echo 'Process exited'

Not a perfect solution, but works for me in most cases.

+4


source







All Articles