直接在win10商店里搜索terminal下载,自动安装。
打开terminal,在左上角,第一个tab后,新建标签页旁边有个下标箭头,点开里面的设置,
装有vscode的环境会自动加载配置json文件,只需要修改profiles和schemes,
这里贴上我的配置,你可以直接复制过去,背景图片路径自己改下。
"profiles": [{
// Make changes here to the powershell.exe profile
"acrylicOpacity": 0.8, //背景透明度
"useAcrylic": true, // 启用毛玻璃
"background": "#000000",
"backgroundImage": "C://terminal_Bg.jpg",
"backgroundImageOpacity": 0.6,
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"colorScheme": "AdventureTime",
"closeOnExit": true,
"cursorColor": "#FFFFFF",
"fontFace": "Delugia Nerd Font",
"hidden": false,
"tabTitle": "Powershell",
"startingDirectory":null
},
{
// Make changes here to the cmd.exe profile
"background": "#000000",
"backgroundImage": "C://terminal_Bg.jpg",
"backgroundImageOpacity": 0.5,
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"name": "cmd",
"commandline": "cmd.exe",
"colorScheme": "AdventureTime",
"useAcrylic": true,
"closeOnExit": true,
"acrylicOpacity": 0.8,
"cursorColor": "#FFFFFF",
"fontFace": "Delugia Nerd Font",
"hidden": false
},
{
"background": "#000000",
"backgroundImage": "C://terminal_Bg.jpg",
"backgroundImageOpacity": 0.6,
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"colorScheme": "AdventureTime",
"useAcrylic": false,
"closeOnExit": true,
"acrylicOpacity": 0.25,
"cursorColor": "#FFFFFF",
"fontFace": "Delugia Nerd Font",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
},
{
"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"hidden": false,
"name": "Ubuntu",
"source": "Windows.Terminal.Wsl"
},
{
"guid": "{6f9994f0-4403-5e85-9cce-98e5da3839bb}",
"hidden": false,
"name": "Ubuntu-16.04",
"source": "Windows.Terminal.Wsl"
}
],
// Add custom color schemes to this array
"schemes": [{
"name": "3024 Day",
"black": "#090300",
"red": "#db2d20",
"green": "#01a252",
"yellow": "#fded02",
"blue": "#01a0e4",
"purple": "#a16a94",
"cyan": "#b5e4f4",
"white": "#a5a2a2",
"brightBlack": "#5c5855",
"brightRed": "#e8bbd0",
"brightGreen": "#3a3432",
"brightYellow": "#4a4543",
"brightBlue": "#807d7c",
"brightPurple": "#d6d5d4",
"brightCyan": "#cdab53",
"brightWhite": "#f7f7f7",
"background": "#f7f7f7",
"foreground": "#4a4543"
},
{
"name": "AdventureTime",
"black": "#050404",
"red": "#bd0013",
"green": "#4ab118",
"yellow": "#e7741e",
"blue": "#0f4ac6",
"purple": "#665993",
"cyan": "#70a598",
"white": "#f8dcc0",
"brightBlack": "#4e7cbf",
"brightRed": "#fc5f5a",
"brightGreen": "#9eff6e",
"brightYellow": "#efc11a",
"brightBlue": "#1997c6",
"brightPurple": "#9b5953",
"brightCyan": "#c8faf4",
"brightWhite": "#f6f5fb",
"background": "#1f1d45",
"foreground": "#f8dcc0"
}
],
相信很多人都是找到文件夹直接shift + 鼠标右键直接打开powershell,我已经习惯了
当然terminal也要。
1、win+r 键,输入regedit,确定,运行注册表。
2、在注册表窗口上面直接输入计算机\HKEY_CLASSES_ROOT\Directory\Background\shell
找到这个注册表文件;
3、选中shell文件,右键新建项,输入 在此处打开Terminal
;
4、选中刚刚新建的文件,右键新建项,输入command
;
5、选中command,双击右侧默认项,在弹框里输入数值:
cmd /c set CURRENT_PATH="%V" & start C:\Users\wuzy\AppData\Local\Microsoft\WindowsApps\wt.exe
这里的路径是,terminal的路径,一般改下wuzy这个user名称为你的名称即可。C:\Users\wuzy\AppData\Local\Microsoft\WindowsApps\wt.exe
6、确认terminal的配置文件中,针对powershell的设置项里,有"startingDirectory":null
即可大功告成。