为什么当我第一次打开 tmux 时我的窗口会突出显示?

为什么当我第一次打开 tmux 时我的窗口会突出显示?

有时,在离开计算机一段时间后,当我打开 tmux 时,会话中的所有窗口都会有某种背景突出显示:

在此输入图像描述

一旦我循环浏览它们,它就会消失,并且只有活动窗口有一个星号:

在此输入图像描述

为什么会发生这种情况?是否可以修复它,使窗口标签永远不会突出显示背景?

答案1

来自“man tmux”:

 STATUS LINE
 [...]
 By default, the window list shows the index, name and (if
 any) flag of the windows present in the current session in ascending
 numerical order.  It may be customised with the window-status-format and
 window-status-current-format options.  The flag is one of the following
 symbols appended to the window name:

       Symbol    Meaning
       *         Denotes the current window.
       -         Marks the last window (previously selected).
       #         Window is monitored and activity has been detected.
       !         A bell has occurred in the window.
       ~         The window has been silent for the monitor-silence
                 interval.
       Z         The window's active pane is zoomed.

 The # symbol relates to the monitor-activity window option.  The window
 name is printed in inverted colours if an alert (bell, activity or
 silence) is present.

由于您没有提供.tmux.conf,因此很难判断是什么触发了警报。尝试C-b : set-option -g monitor-activity off; set-option -g monitor-silence 0; set-option -g bell-action none测试问题是否仍然存在。您还可以通过将这些行添加到您的.tmux.conf

set window-status-activity-style none
set window-status-bell-style none

相关内容