设置Windows Terminal在屏幕上的默认启动位置:launchMode或initialPosition

https://stackoverflow.com/questions/58602046/setting-default-position-of-windows-terminal-preview

原问题描述:
On opening Windows Terminal (Preview), part of the window is below the taskbar. When I move the application window to a desired position on screen and re-open the application, it is not at the previous position, which I had set by dragging the window.

In the profile.json settings file, there is no option to set the default window location.

How do keep the window position from previous session, as I don’t want to drag the window every time I open the application?

翻译:
刚打开Windows Terminal的窗口时,窗口偏置右下,一部分将会被任务栏遮住(,关闭按钮也被挡住了,令人很不舒服)。可以将应用程序窗口移动到屏幕上可行的位置,但这次拖动的作用仅限于当次使用。重新打开应用程序时,它并不在我通过拖动窗口设置的前一个位置。
在这里插入图片描述
profiles.json设置文件中,并没有设置默认窗口位置的选项。从VSCode的补全也能发现这个问题。

这是核心问题所在了

如果不想每次打开应用程序时都拖拽窗口,如何保持窗口处于前一次拖动设置的那个可行位置?

回答
回复上一次拖动的位置是不可能的,但是可以通过设定默认位置的方式使得每一次重新打开的时候都是一个比较好的位置。

可以使用如下的三个选项设定终端窗口大小以及位置。

"initialCols": 120,
"initialRows": 60,
"initialPosition": "2400,500", // x,y

也可以直接使用launchMode设置,懒人全屏防止遮挡。

"launchMode": "maximized",

特别注意:这几个参数都是在全局中!!!!!不是在profiles中!!!!

可以看到在这种情况下是有补全的噢
在这里插入图片描述

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值