settings.json

// This file was initially generated by Windows Terminal 1.3.2651.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.

// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
    "$schema": "https://aka.ms/terminal-profiles-schema",

    "defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",

    // You can add more global application settings here.
    // To learn more about global settings, visit https://aka.ms/terminal-global-settings

    // If enabled, selections are automatically copied to your clipboard.
    "copyOnSelect": false,

    // If enabled, formatted data is also copied to your clipboard
    "copyFormatting": false,

    // A profile specifies a command to execute paired with information about how it should look and feel.
    // Each one of them will appear in the 'New Tab' dropdown,
    //   and can be invoked from the commandline with `wt.exe -p xxx`
    // To learn more about profiles, visit https://aka.ms/terminal-profile-settings
    "profiles":
    {
        "defaults":
        {
    "startingDirectory": null
            // Put settings here that you want to apply to all profiles.
        },
        "list":
        [
            {
                // Make changes here to the powershell.exe profile.
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false,
        "colorScheme": "wsl2",
        "fontFace": "Fira Code Retina"
            },
            {
                // 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": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
                "hidden": false,
                "name": "Ubuntu-20.04",
                "source": "Windows.Terminal.Wsl",
        "colorScheme": "Solarized Dark",
        "fontFace": "Fira Code Retina",
        "fontSize": 12,
        "historySize": 9001,
        "backgroundImageOpacity" : 0.4,
        "acrylicOpacity" : 0.8,
        "cursorColor" : "#FFFFFF",
        "padding" : "0, 0, 0, 0",
        "tabTitle" : "Ubuntu (WSL)",
        "cursorShape" : "bar",
        "snapOnInput" : true,
        "closeOnExit" : true,
        "icon": "C:\\favicon.ico",
        "useAcrylic" : true
            }
        ]
    },

    // Add custom color schemes to this array.
    // To learn more about color schemes, visit https://aka.ms/terminal-color-schemes
    "schemes": [
        {
        "name" : "wsl2",
        "background" : "#002B36",
        "black" : "#002B36",
        "blue" : "#268BD2",
        "brightBlack" : "#657B83",
        "brightBlue" : "#839496",
        "brightCyan" : "#D33682",
        "brightGreen" : "#B58900",
        "brightPurple" : "#EEE8D5",
        "brightRed" : "#CB4B16",
        "brightWhite" : "#FDF6E3",
        "brightYellow" : "#586E75",
        "cyan" : "#2AA198",
        "foreground" : "#93A1A1",
        "green" : "#859900",
        "purple" : "#6C71C4",
        "red" : "#DC322F",
        "white" : "#93A1A1",
        "yellow" : "#B58900"
        },
        {
                "name" : "Frost",
                "background" : "#FFFFFF",
                "black" : "#3C5712",
                "blue" : "#17b2ff",
                "brightBlack" : "#749B36",
                "brightBlue" : "#27B2F6",
                "brightCyan" : "#13A8C0",
                "brightGreen" : "#89AF50",
                "brightPurple" : "#F2A20A",
                "brightRed" : "#F49B36",
                "brightWhite" : "#741274",
                "brightYellow" : "#991070",
                "cyan" : "#3C96A6",
                "foreground" : "#000000",
                "green" : "#6AAE08",
                "purple" : "#991070",
                "red" : "#8D0C0C",
                "white" : "#6E386E",
                "yellow" : "#991070"
        },
        {
                "name": "Campbell",
                "foreground": "#CCCCCC",
                "background": "#0C0C0C",
                "cursorColor": "#FFFFFF",
                "black": "#0C0C0C",
                "red": "#C50F1F",
                "green": "#13A10E",
                "yellow": "#C19C00",
                "blue": "#0037DA",
                "purple": "#881798",
                "cyan": "#3A96DD",
                "white": "#CCCCCC",
                "brightBlack": "#767676",
                "brightRed": "#E74856",
                "brightGreen": "#16C60C",
                "brightYellow": "#F9F1A5",
                "brightBlue": "#3B78FF",
                "brightPurple": "#B4009E",
                "brightCyan": "#61D6D6",
                "brightWhite": "#F2F2F2"
        },
        {
                "name": "Campbell Powershell",
                "foreground": "#CCCCCC",
                "background": "#012456",
                "cursorColor": "#FFFFFF",
                "black": "#0C0C0C",
                "red": "#C50F1F",
                "green": "#13A10E",
                "yellow": "#C19C00",
                "blue": "#0037DA",
                "purple": "#881798",
                "cyan": "#3A96DD",
                "white": "#CCCCCC",
                "brightBlack": "#767676",
                "brightRed": "#E74856",
                "brightGreen": "#16C60C",
                "brightYellow": "#F9F1A5",
                "brightBlue": "#3B78FF",
                "brightPurple": "#B4009E",
                "brightCyan": "#61D6D6",
                "brightWhite": "#F2F2F2"
        },
        {
                "name": "Vintage",
                "foreground": "#C0C0C0",
                "background": "#000000",
                "cursorColor": "#FFFFFF",
                "black": "#000000",
                "red": "#800000",
                "green": "#008000",
                "yellow": "#808000",
                "blue": "#000080",
                "purple": "#800080",
                "cyan": "#008080",
                "white": "#C0C0C0",
                "brightBlack": "#808080",
                "brightRed": "#FF0000",
                "brightGreen": "#00FF00",
                "brightYellow": "#FFFF00",
                "brightBlue": "#0000FF",
                "brightPurple": "#FF00FF",
                "brightCyan": "#00FFFF",
                "brightWhite": "#FFFFFF"
        },
        {
                "name": "One Half Dark",
                "foreground": "#DCDFE4",
                "background": "#282C34",
                "cursorColor": "#FFFFFF",
                "black": "#282C34",
                "red": "#E06C75",
                "green": "#98C379",
                "yellow": "#E5C07B",
                "blue": "#61AFEF",
                "purple": "#C678DD",
                "cyan": "#56B6C2",
                "white": "#DCDFE4",
                "brightBlack": "#5A6374",
                "brightRed": "#E06C75",
                "brightGreen": "#98C379",
                "brightYellow": "#E5C07B",
                "brightBlue": "#61AFEF",
                "brightPurple": "#C678DD",
                "brightCyan": "#56B6C2",
                "brightWhite": "#DCDFE4"
        },
        {
                "name": "One Half Light",
                "foreground": "#383A42",
                "background": "#FAFAFA",
                "cursorColor": "#4F525D",
                "black": "#383A42",
                "red": "#E45649",
                "green": "#50A14F",
                "yellow": "#C18301",
                "blue": "#0184BC",
                "purple": "#A626A4",
                "cyan": "#0997B3",
                "white": "#FAFAFA",
                "brightBlack": "#4F525D",
                "brightRed": "#DF6C75",
                "brightGreen": "#98C379",
                "brightYellow": "#E4C07A",
                "brightBlue": "#61AFEF",
                "brightPurple": "#C577DD",
                "brightCyan": "#56B5C1",
                "brightWhite": "#FFFFFF"
        },
        {
                "name": "Solarized Dark",
                "foreground": "#839496",
                "background": "#002B36",
                "cursorColor": "#FFFFFF",
                "black": "#073642",
                "red": "#DC322F",
                "green": "#859900",
                "yellow": "#B58900",
                "blue": "#268BD2",
                "purple": "#D33682",
                "cyan": "#2AA198",
                "white": "#EEE8D5",
                "brightBlack": "#002B36",
                "brightRed": "#CB4B16",
                "brightGreen": "#586E75",
                "brightYellow": "#657B83",
                "brightBlue": "#839496",
                "brightPurple": "#6C71C4",
                "brightCyan": "#93A1A1",
                "brightWhite": "#FDF6E3"
        },
        {
                "name": "Solarized Light",
                "foreground": "#657B83",
                "background": "#FDF6E3",
                "cursorColor": "#002B36",
                "black": "#073642",
                "red": "#DC322F",
                "green": "#859900",
                "yellow": "#B58900",
                "blue": "#268BD2",
                "purple": "#D33682",
                "cyan": "#2AA198",
                "white": "#EEE8D5",
                "brightBlack": "#002B36",
                "brightRed": "#CB4B16",
                "brightGreen": "#586E75",
                "brightYellow": "#657B83",
                "brightBlue": "#839496",
                "brightPurple": "#6C71C4",
                "brightCyan": "#93A1A1",
                "brightWhite": "#FDF6E3"
        },
        {
                "name": "Tango Dark",
                "foreground": "#D3D7CF",
                "background": "#000000",
                "cursorColor": "#FFFFFF",
                "black": "#000000",
                "red": "#CC0000",
                "green": "#4E9A06",
                "yellow": "#C4A000",
                "blue": "#3465A4",
                "purple": "#75507B",
                "cyan": "#06989A",
                "white": "#D3D7CF",
                "brightBlack": "#555753",
                "brightRed": "#EF2929",
                "brightGreen": "#8AE234",
                "brightYellow": "#FCE94F",
                "brightBlue": "#729FCF",
                "brightPurple": "#AD7FA8",
                "brightCyan": "#34E2E2",
                "brightWhite": "#EEEEEC"
        },
        {
                "name": "Tango Light",
                "foreground": "#555753",
                "background": "#FFFFFF",
                "cursorColor": "#000000",
                "black": "#000000",
                "red": "#CC0000",
                "green": "#4E9A06",
                "yellow": "#C4A000",
                "blue": "#3465A4",
                "purple": "#75507B",
                "cyan": "#06989A",
                "white": "#D3D7CF",
                "brightBlack": "#555753",
                "brightRed": "#EF2929",
                "brightGreen": "#8AE234",
                "brightYellow": "#FCE94F",
                "brightBlue": "#729FCF",
                "brightPurple": "#AD7FA8",
                "brightCyan": "#34E2E2",
                "brightWhite": "#EEEEEC"
        }
     ],

    // Add custom actions and keybindings to this array.
    // To unbind a key combination from your defaults.json, set the command to "unbound".
    // To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings
    "actions":
    [
        // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
        // These two lines additionally bind them to Ctrl+C and Ctrl+V.
        // To learn more about selection, visit https://aka.ms/terminal-selection
        { "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
        { "command": "paste", "keys": "ctrl+v" },

        // Press Ctrl+Shift+F to open the search box
        { "command": "find", "keys": "ctrl+shift+f" },

        // Press Alt+Shift+D to open a new pane.
        // - "split": "auto" makes this pane open in the direction that provides the most surface area.
        // - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
        // To learn more about panes, visit https://aka.ms/terminal-panes
        { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" }
    ]
}


算了,再记录一下折腾之路吧。

安装WSL2

用管理员权限打开Powershell,粘,回车,重启!

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

再,粘,回车,重启!

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

再,粘,回车!

wsl --set-default-version 2

如果你在之前已安装了ubuntu系统,且WSL为1的话,切换也很简单,粘,回车!

wsl --set-version Ubuntu-**.** 2

查看WSL版本,粘,回车!

wsl -l -v

安装Ubuntu以及Terminal

打开Microsoft Store,搜Ubuntu你喜欢的版本以及Terminal,点获取!点下载!

稍稍美化一下

打开Terminal,安装powerline字体先(我个人喜欢Fira Code Retina),打开powershell,粘,回车!

git clone https://github.com/powerline/fonts.git
cd fonts
.\install.ps1

脚本安装过程中如果有你已经安装过的字体要手点替换或跳过。

再打开Terminal安装zsh:

sudo apt update
sudo apt install git zsh -y

再安装oh-my-zsh:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

这一步也许你会出错报一个443的connect faild错误,被墙了,要么全局,要么用代理打开这个网址,在网页直接Ctrl+S到本地,再用Terminal跑一下就开始clone了。

安装完成后,改一下主题:

vim ~./zshrc

改成你喜欢的,比如agnoster

然后就是文章最上面我贴的配置备份了,按照个人喜好改参数就可以了。

其他

还有还有,如果你想要在资源管理器的右键菜单加入快捷方式,请自行粘贴修改运行此脚本,reg格式哦

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere]
@="DO NOT CLICK ME!!!"
"Icon"="C:\\favicon.ico"

[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere\command]
@="C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"

[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
@="DO NOT CLICK ME!!!"
"Icon"="C:\\favicon.ico"

[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]
@="C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"

[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere]
@="DO NOT CLICK ME!!!"
"Icon"="C:\\favicon.ico"

[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere\command]
@="C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"

[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere]
@="DO NOT CLICK ME!!!"
"Icon"="C:\\favicon.ico"

[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere\command]
@="C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"

最后再贴个有关设置中参数比较详细的文章https://blog.csdn.net/u013469753/article/details/107973769

属性 释义 说明
alwaysShowTabs 始终显示标签
defaultProfile 默认终端 GUID,用于连接终端配置
initialCols 默认列数
initialRows 默认行数
keybindings 快捷键配置
command 快捷键执行的命令
keys 快捷键
requestedTheme 主题
showTabsInTitlebar 在标题栏中显示终端窗口标签栏
showTerminalTitleInTitlebar 在标签栏中显示终端标签
acrylicOpacity 不透明度
closeOnExit 退出后关闭
colorScheme 颜色主题
commandline 命令行程序
cursorColor 光标颜色
cursorShape 光标形状
fontFace 字体
fontSize 字体大小
guid GUID 终端配置标识
historySize 历史大小
icon 图标
name 名称
padding
snapOnInput 嗅探输入
startingDirectory 初始目录
useAcrylic 使用不透明度
最后修改:2021 年 01 月 11 日 09 : 42 AM
如果觉得我的文章对你有用,请随意赞赏