2

Each time I have more than 4 tabs, I really like to know in which one there's activity. Until now, I used to benefit from rxvt tabbing system. It displays a * next to tabs which are not shown, but have an activity. It's really usefull when you're on a IRC channel for example. How can I do it with zsh/screen ?

Here's my .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"
}

and my .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
cphyc
  • 440
  • 5
  • 16

1 Answers1

0

This is documented in the manual:

  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.

You can manually toggle monitoring for the current window via C-a M, or if you want monitoring on for all windows by default, add defmonitor on to your screenrc. Once on, any windows to the left or right of the current one in your hardstatus line (as expanded by %-Lw and %+Lw respectively in your hardstatus string line) will show an @ symbol after the hyphen which follows the window number. You'll also get an alert message which can be configured via the activity command.

On my system, the @ doesn't appear until something else in the window changes. This can be fixed by removing hardstatus off from your config file.

Finally, I strongly recommend that you try tmux. Development on GNU screen has mostly stalled, and tmux is an actively maintained and developed replacement which has pretty much a large superset of screen's functionality.

 

Max Coplan
  • 1,111
  • 13
  • 27
Adam Spiers
  • 17,397
  • 5
  • 46
  • 65