2013-07-19 98 views
2

每次我有超过4个标签时,我真的很想知道哪一个是活动。 到现在为止,我曾经受益于rxvt tabbing系统。它在没有显示的标签旁显示一个*,但有一个活动。例如,当您在IRC频道上时,它非常有用。 我如何用zsh/screen来做到这一点?如何在GNU Screen hardstatus标签中显示有活动?

这里是我的.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 

回答

0

这本手册中记载:

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。一旦打开,硬状态行当前窗口左侧或右侧的任何窗口(分别在hardstatus string行中分别被%-Lw%+Lw扩展)将在窗口号后面的连字符后面显示一个@符号。您还会收到一条警报消息,可通过activity命令进行配置。

在我的系统上,@在窗口中的其他内容更改之前不会显示。这可以通过从配置文件中删除hardstatus off来解决。

最后,我强烈建议您尝试tmux。在GNU屏幕上的开发已经安装,tmux是一个积极维护和开发的替代品,几乎有large superset of screen's functionality

相关问题