Windows Terminal配置文件路径 配置Windows Terminal在任意目录打开的方法
时间:2023-05-28 04:26:07
windows Terminal个性化配置是通过修改json配置文件来实现的,没有GUI设置界面。如图,打开windows terminal,点击向下箭头,选择Setting即可打开json配置文件(使用快捷键ctrl+,快捷键也能快速打开)。
采用网上的一种配置方法,放出地址,并简化一下配置过程:
首先我们要创建一个新文件夹存放注册表和我们的ico图标,作者推荐在这里创建:
C:\Users\starinsun\AppData\Local\terminal
这里需要使用常量:“USERPROFILE”,我的指向是个人文件夹:
C:\WINDOWS\System32》echo %USERPROFILE%
C:\Users\starinsun
然后创建注册表文件“wt.reg”
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@=“Windows terminal here”
“Icon”=“%USERPROFILE%\\AppData\\Local\\terminal\\wt_32.ico”
[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@=“C:\\Users\\starinsun\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe”
最后双击运行即可。
其实还有其他很多种配置方法,有人说直接把powershell 的注册改掉即可,其实我觉得很多人和我一样困在这个问题不是注册表之类的东西不熟悉或者不会写,而是找不到wt.exe这个UWP应用的exe文件在哪儿:
“C:\\Users\\starinsun\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe”
Here You Are.
随着新版本的更新,WT配置中出现了一个默认的JSON文件,来存储一些默认配置,包括azure的命令行打开,所以上述方法设置完成之后发现一切都没有变化,不管你在哪里打开,他都会默认从你的用户目录中打开。
发现这个问题是因为我想把默认终端切换到powershell,就把之前的配置删掉了。
这是因为default.json中每个profie添加了一个startdirectory的属性,默认指向你的用户目录,所以我们只需要在profile.json中把这个配置覆盖掉即可,添加一下字段
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"cursorShape": "emptyBox",
"colorScheme": "Material Dark",
"useAcrylic": true,
"acrylicOpacity": 0.8,
"fontFace": "Fira Code",
"fontSize": 11,
"hidden": false,
"startingDirectory": null //新添加的
},
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
微软慢速通道推送累积更新补丁KB4034450
![](https://img.aspxhome.com/file/2023/29/a260526_0s.jpg)
MindMapper导图导出为Excel文件
![](https://img.aspxhome.com/file/2023/1/37191_0s.png)
电脑屏幕出现条纹闪烁怎么解决?
![](https://img.aspxhome.com/file/2023/3/a292017_0s.png)
洛雪音乐助手请求异常怎么办
![](https://img.aspxhome.com/file/2023/9/a341392_0s.png)
win10和win7系统的配置要求如何?win10系统的配置参数简介
![](https://img.aspxhome.com/file/2023/8/46968_0s.png)
Win10 Mobile创新者更新慢速预览版14965今日推送
![](https://img.aspxhome.com/file/2023/28/a243098_0s.jpg)
win10 word2016闪退怎么解决? word2019闪退没保存怎么恢复
![](https://img.aspxhome.com/file/2023/4/34974_0s.jpg)
Win7系统如何恢复出厂设置?
![](https://img.aspxhome.com/file/2023/27/a229874_0s.png)
word2019的公式编辑器在哪里?word2019公式编辑器使用方法
![](https://img.aspxhome.com/file/2023/30/a266914_0s.jpg)
Win7系统电脑使用注册表查看开机启动项操作方法
![](https://img.aspxhome.com/file/2023/2/a287198_0s.jpg)
excel表格数据关联合并的方法
Win7系统如何自定义“开始”菜单内容?DIY“开始”菜单图文教程
![](https://img.aspxhome.com/file/2023/29/a254287_0s.jpg)
Word2007怎么删除页眉横线
![](https://img.aspxhome.com/file/2023/6/20376_0s.jpg)
Win11打开应用时会弹出是否允许窗口怎么解决?
![](https://img.aspxhome.com/file/2023/1/a283487_0s.jpg)
wps演示怎样导入外部模板
怎样批量清除WPS/Word回车符
macOS 10.15 开启 HiDPI
![](https://img.aspxhome.com/file/2023/7/a211257_0s.jpeg)
Win7系统电脑怎么批量更改文件属性_Win7系统电脑批量更改文件属性的方法
![](https://img.aspxhome.com/file/2023/3/a297368_0s.jpg)
win7旗舰版 64位系统开机无法加载到桌面的解决方法
![](https://img.aspxhome.com/file/2023/5/a316970_0s.png)
windows xp系统的文件和文件夹删除与恢复教程
![](https://img.aspxhome.com/file/2023/29/a257160_0s.jpg)