gpt4 book ai didi

linux - 我可以使用命令行或 perl 更改终端位置吗?

转载 作者:太空宇宙 更新时间:2023-11-04 04:43:27 25 4
gpt4 key购买 nike

我在监视另一个屏幕时正在运行多个后台进程。我通常会调整后台进程的终端窗口大小,并将其放置在屏幕的最右侧,然后运行 ​​perl 脚本。我已经添加了一个系统调用 resize -s ## ## 来自动调整窗口大小,但是有没有办法也调整窗口位置?提前致谢

最佳答案

如果

resize -s row col

有效,那么可能会实现 xterm 的转义序列库的其他部分(在本例中改编自 dtterm)。在本节中

CSI Ps ; Ps ; Ps t
Window manipulation (from dtterm, as well as extensions by
xterm). These controls may be disabled using the allowWin-
dowOps resource.

XTerm Control Sequences列出这个:

        Ps = 3 ;  x ;  y -> Move window to [x, y].

您可以使用它

printf '\033[3;%d;%dt' $x $y

在 shell 脚本中,$x$y 是 x/y 坐标。

关于linux - 我可以使用命令行或 perl 更改终端位置吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52980265/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com