每次我都有四个以上的标签,我真的很想知道其中哪个活动。到目前为止,我以前一直从rxvt制表系统中受益。它在未显示但有活动的选项卡旁边显示*。例如,当您在IRC频道上时,它确实很有用。如何使用zsh / screen进行此操作?
这是我的.zshrc:
function precmd {
echo -ne "\033]83;title zsh\007"
}
function preexec {
local foo="$2 "
local bar=${${=foo}[1]}
echo -ne "\033]83;title $bar\007"
}
和我的.screenrc
hardstatus off
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W} %c %{g}]'
[...]
shell "/usr/bin/zsh"
aclchg :window: -rwx #?
aclchg :window: +x title
在手册中有记录:
monitor [on|off]
Toggles activity monitoring of windows. When monitoring is
turned on and an affected window is switched into the background,
you will receive the activity notification message in the status
line at the first sign of output and the window will also be
marked with an `@' in the window-status display. Monitoring is
initially off for all windows.
您可以通过C-a M
手动切换对当前窗口的监视,或者如果要默认监视所有窗口,请将defmonitor on
添加到screenrc
。启用后,硬状态行中当前窗口左侧或右侧的任何窗口(在%-Lw
行中分别由%+Lw
和hardstatus string
分别展开)将在连字符后的连字符后面显示@
符号窗口号。您还将收到一条警报消息,可以通过activity
命令进行配置。
在我的系统上,直到窗口中的其他内容发生更改,@
才会出现。可以通过从配置文件中删除hardstatus off
来解决此问题。
最后,我强烈建议您尝试tmux
。在GNU屏幕上的开发大部分都停滞了,tmux
是一个积极维护和开发的替代品,几乎具有tmux
。