从命令行更改终止符的大小

从命令行更改终止符的大小

我的愿望是我能够随意放大和缩小终端(我使用的terminator)的尺寸。例如,通过给出命令resize 600-400,我可以调整terminator窗口大小。

是否可以?如果terminator不能,是否有其他终端可以做到这一点?

答案1

控制序列可以改变终端的大小(和位置),例如

alias term-norm='printf "\033[8;24;80t"'
alias term-tall='printf "\033[8;0;80t"'

或详细

ESC [
     Control Sequence Introducer (CSI  is 0x9b)

...

CSI Ps ; Ps ; Ps t
          Window manipulation (from dtterm, as well as extensions).
          These controls may be disabled using the allowWindowOps
          resource.  Valid values for the first (and any additional
          parameters) are:
            Ps = 1  -> De-iconify window.
            Ps = 2  -> Iconify window.
            Ps = 3  ;  x ;  y -> Move window to [x, y].
            Ps = 4  ;  height ;  width -> Resize the xterm window to
          given height and width in pixels.  Omitted parameters reuse
          the current height or width.  Zero parameters use the dis-
          play's height or width.
            Ps = 5  -> Raise the xterm window to the front of the stack-
          ing order.
            Ps = 6  -> Lower the xterm window to the bottom of the
          stacking order.
            Ps = 7  -> Refresh the xterm window.
            Ps = 8  ;  height ;  width -> Resize the text area to given
          height and width in characters.  Omitted parameters reuse the
          current height or width.  Zero parameters use the display's
          height or width.
            Ps = 9  ;  0  -> Restore maximized window.
            Ps = 9  ;  1  -> Maximize window (i.e., resize to screen
          size).
            Ps = 9  ;  2  -> Maximize window vertically.
            Ps = 9  ;  3  -> Maximize window horizontally.
            Ps = 1 0  ;  0  -> Undo full-screen mode.
            Ps = 1 0  ;  1  -> Change to full-screen.
            Ps = 1 0  ;  2  -> Toggle full-screen.
...

相关内容