LoginSignup
0
0

More than 5 years have passed since last update.

GNU screenの起動時にウィンドウをリサイズさせなくする

Posted at

やり方だけなら~/.screenrcにこれを書いておく。ただしxterm*の部分は自分の環境変数TERMで置き換えること。

termcapinfo xterm* 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'

で、この文字列が何を意味するのか調べてみた。

isはtermcapのケーパビリティ名で「Initialization string 2 at login」、端末を初期化するために送る文字列。

=の後の部分は

シーケンス 意味
\E[r スクロール領域を設定。副作用なのか、カーソルを(0,0)へ移動する効果もある。Set Scrolling Region
\E[m 文字色等をリセット。Character Attributes (Normal)
\E[2J 画面クリア。Erase in Display
\E[H カーソルを(0,0)へ移動。Homeキー
\E[?7h 折り返しの設定?DEC Private Mode Set (Wraparound Mode)
\E[?1;4;6l DEC Private Mode Reset

参考:
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
Psは数値パラメータ。Pmはセミコロン区切りの複数の数値パラメータ。詳しくは冒頭のDefinitionsを参照。

  • ESC [のことをCSI (Control Sequence Introducer)という。
  • エスケープシーケンスはecho -ne "\e[r"のようにしてテストできる(bashの場合)
0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0