==> 在 Chou Yeh-Jyi <[email protected]> 的文章中提到:
> 我通常只有在一種情況下才會使用到這項功能。
> 平常用 putty 開 80x35 ,會遇到有些程式不吃 terminal setting 的情況,
> 比如說使用 virtual terminal 的 bbs 通常直接假設營幕大小為 80x24。
> 此時可以利用這個功能, C-a S , C-a :resize 24 切出一塊 80x24 的
> 區域,來使畫面輸出正常。要恢復原來的狀態,只要按 C-a Q 即可。
> (spliting and resizing region may noise the window, use C-L to redraw)
> 若是使用 screen 3.9.11 以後的版本,可以在 ~/.screenrc 中設熱鍵:
> bind R eval split "resize 24" redisplay
> 如此,便可以用 C-a R 直接切一塊 80x24 的區域。
這樣的方法會讓所有的 window 都變成一樣的size,
如果需要在windows 之間切換的話,並不是很好用
還不如直接 resize terminal...
screen 有另一個比較好玩的功能, hardstatus
hardstatus [on|off]
用來決定要不要使用terminal 最後一行的 hard status line,
這對一般人來說沒有什麼用途,應該很少人還在用 wired terminal 了吧? :)
hardstatus [always]lastline|message|ignore [string]
這一行告訴 screen 如果沒有 hard status line, 要怎麼顯示
lastline 是使用 terminal 的最後一行,所以程式實際"看到"的
terminal 會比 screen 所看的要少一行
message 則是用一般顯示訊息的方式顯示
ignore 就是不顯示了
hardstatus string [string]
有趣的地方在這裡。 hard status line 可以顯示什麼?
這個格式可以用自定要顯示的東西,例如自己打的一行字,
或是其他有用的資訊。在 man page 的STRING ESCAPES 這一節裡
有詳細的說明。以我的 .screenrc 為例,加入這一行
hardstatus lastline '%{.gk}%?%-LW %?%{+b ..y}%n%f %t%{-b ..k}%?%+LW%?%=%H %0C'
可以顯示目前所有的 window 和名稱,再配合 putty (current version)
的全螢幕功能,看起來還有幾分神似 NCSA telnet 。 :p
--
The trouble with a kitten is that when it grows up, it's always a cat
-- Ogden Nash.
--
* Origin: ★ 交通大學資訊科學系 BBS ★ <bbs.cis.nctu.edu.tw: 140.113.23.3>