TMUX – Limit Activity-Monitor Window Size


As part of my work I typically need to connect to multiple different servers via SSH. I like to run a local tmux session to manage various terminals and then from within the SSH session to the remote server I also like to run another tmux session (using a different key binding) in order to control various terminals there. The servers I connect to are in different time zones and so I like to have the current time displayed in the tmux status bar.

This all works great until I try to activate window activity monitoring in my local tmux session. Then every time the time changes in the tmux status bar in my SSH sessions, it thinks there has been activity in that window and highlights it.

So, is there a way I can limit the activity-monitor to check everything but the last line (the tmux status bar) in the session? Checking the man pages and googling didn't reveal a potential solution, so I'm not sure this is possible. Alternative suggestions/approaches welcome.

Best Answer

I just stumbled upon this issue too and found a sort of a workaround, so I thought I'd share. You can set tmux's status-interval option to 0 to disable status updates (which occur every 15 seconds by default).

It'll prevent the status clock to automatically update and thus won't trigger the activity notifications, the drawback being that the clock won't be up-to-date anymore except when tmux updates it, redraws the screen or when you hit Ctrl + b (or whatever prefix keys you use).

Note: if you use a version of tmux below 1.9, setting status-interval to 0 might not work (see bug n°78). If you can't or don't want to upgrade to version 1.9, you can set status-interval to some high value that suits your needs (eg. 43200 for 12 hours).

Related Question