2013-07-19 26 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

相關問題