如何在具有活动的GNU Screen hardstatus选项卡中显示?

时间:2013-07-19 23:24:15

标签: zsh gnu-screen screenrc

每次我有超过4个标签,我真的很想知道哪一个有活动。 到现在为止,我曾经受益于rxvt tabbing系统。它会在未显示但有活动的选项卡旁边显示*。例如,当您在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

1 个答案:

答案 0 :(得分: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行中当前版本左侧或右侧的任何窗口(分别在%-Lw%+Lwhardstatus string展开)将显示{{1}在窗口编号后面的连字符后面的符号。您还将收到一条警报消息,可以通过@命令进行配置。

在我的系统上,activity只有在窗口中的其他内容发生变化时才会显示。这可以通过从配置文件中删除@来解决。

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

相关问题