$basePath = "Registry::HKEY_CLASSES_ROOT\Directory\Background\shell"
sudo New-Item -Path "$basePath\wt" -Force -Value "Windows Terminal here"
sudo New-ItemProperty -Path "$basePath\wt" -Force -Name "Icon" -PropertyType ExpandString -Value "C:\Scoop\apps\windows-terminal\current\Images\LargeTile.scale-100.png"
sudo New-Item -Path "$basePath\wt\command" -Force -Type ExpandString -Value '"C:\Scoop\apps\windows-terminal\current\WindowsTerminal.exe" -p PowerShell -d "%V"'
{
"$schema": "https://aka.ms/terminal-profiles-schema",
// 默认启动的终端 id
"defaultProfile": "{07b52e3e-de2c-5db1-bd2d-ba144ed6c273}",
// 是否将选择的内容自动复制到剪切板
"copyOnSelect": false,
// 是否将格式化后的内容复制到剪切板
"copyFormatting": false,
// 全局设置
"profiles": {
"defaults": {
"fontFace": "MesloLGL NF", //字体
"fontSize": 12,
"useAcrylic": true, //使用不透明度
"acrylicOpacity": 0.9, //不透明度
"cursorShape": "bar",
"snapOnInput": true, //嗅探输入
"startingDirectory": "d:"
}
},
"list": [
{
// Make changes here to the powershell.exe profile.
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "电壳",
"commandline": "powershell.exe",
"hidden": false
},
{
"guid": "{46ca431a-3a87-5fb3-83cd-11ececc031d2}",
"hidden": false,
"name": "邪神",
"icon": "file:///c:/users/ci/pictures/icons/kali.png",
"source": "Windows.Terminal.Wsl"
},
{
"guid": "{55ca431a-3a87-5fb3-83cd-11ececc031d2}",
"hidden": false,
"name": "邪神(窗口)",
"icon": "file:///c:/users/ci/pictures/icons/kali.png",
// 窗口模式启动
"commandline": "wsl -d kali-linux kex --wtstart -s"
},
{
// Make changes here to the cmd.exe profile.
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"name": "命令提示符",
"commandline": "cmd.exe",
"hidden": false
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "天蓝",
"source": "Windows.Terminal.Azure"
}
]
}
Import-Module PSReadLine
Set-PSReadlineKeyHandler -Key Tab -Function Complete
Set-PSReadLineKeyHandler -Key "Ctrl+d" -Function MenuComplete
Set-PSReadLineKeyHandler -Key "Ctrl+z" -Function Undo
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
{
"terminal.integrated.shell.windows": "C:/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe",
"terminal.integrated.shellArgs.windows": [
"-ExecutionPolicy",
"Bypass",
"-NoLogo",
"-NoExit",
// 初始化命令
"-Command",
"clear;cd d:"
]
}
# scoop
function sls {scoop list}
function sud {scoop update}
function suda {scoop update *}
function scla {scoop cleanup *}
function sst {scoop status}
function scu {scoop checkup}
function scat {scoop config aria2-enabled true}
function scaf {scoop config aria2-enabled false}
function scf {code $home\.config\scoop\config.json}
function srm {remove-item -r $env:scoop\cache\*; clear}
function sbuc {set-location $env:scoop\buckets\scoopet}