1.添加Windows Terminal到鼠标右键

从开始菜单进入Windows Terminal然后寻找文件路径很不方便,让Windows Terminal代替第三方shell才是最舒服的操作。

但是稀里糊涂手动添加注册表的时候我出了很多问题,kaliWindows Terminal都重装了很多次,环境变量一直出问题。

现在终于找到完美的办法!

详情参看如下

补充两点:
一是制作好reg文件之后要双击然后才会添加到注册表,文章里忘了说;
二是桌面上是要使用shift+鼠标右键才会显示Windows Terminal。

添加Windows Terminal到鼠标右键菜单
Windows上有很多命令行程序,例如CMD和PowerShell。微软在Build 2019上推出了一款面向Windows10的命令行程序,这款程序集合了Windows上的...

2.profiles.json设置


// 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": "{46ca431a-3a87-5fb3-83cd-11ececc031d2}",
    "initialRows": 30,
    "initialCols": 120,
    "alwaysShowTabs": true,
    "showTerminalTitleInTitlebar": true,
    "experimental_showTabsInTitlebar": true,
    "profiles":
    {
        "defaults":
        {
            // Put settings here that you want to apply to all profiles
        },
        "list":
        [
            {
                // Make changes here to the cmd.exe profile
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "name": "cmd",
                "commandline": "cmd.exe",
                "hidden": false,
                "colorscheme": "Campbell",
                "historySize": 9001,
                "snapOnInput": true,
                "cursorColor": "#FFFFFF",
                "cursorShape": "bar",
                "fontFace": "DejaVu Sans Mono for Powerline",
                "fontSize": 12,
                "acrylicOpacity": 0.75,
                "useAcrylic": true,
                "closeOnExit": true,
                "padding": "0, 0, 0, 0",
                "startingDirectory": null
            },
            {
                // Make changes here to the powershell.exe profile
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false,
                "background": "#002731",
                //"colorscheme": "Campbell",
                "historySize": 9001,
                "snapOnInput": true,
                "cursorColor": "#FFFFFF",
                "cursorShape": "bar",
                "fontFace": "DejaVu Sans Mono for Powerline",
                "fontSize": 12,
                "acrylicOpacity": 0.5,
                "useAcrylic": true,
                "closeOnExit": true,
                "padding": "0, 0, 0, 0",
                "startingDirectory": null
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure",
                "startingDirectory": null
            },
            {
                "guid": "{46ca431a-3a87-5fb3-83cd-11ececc031d2}",
                "hidden": false,
                "name": "kali-linux",
                "source": "Windows.Terminal.Wsl",
                "startingDirectory": null,
                "historySize": 9001,
                "snapOnInput": true,
                "cursorColor": "#FFFFFF",
                "cursorShape": "bar",
                "fontFace": "DejaVu Sans Mono for Powerline",
                "fontSize": 12,
                "acrylicOpacity": 0.75,
                "useAcrylic": true,
                "closeOnExit": true,
                "padding": "0, 0, 0, 0",
                "backgroundImage" : "C://Users/HP/Pictures/1.jpg", 
                "backgroundImageOpacity" : 0.3  
            }
        ]
    },
    // Add custom color schemes to this array
    "schemes": [
        {
            "name": "Campbell",
            "foreground": "#A7B191", 
            "background": "#0C0C0C",
            "colors": [
                "#0C0C0C",
                "#C50F1F",
                "#13A10E",
                "#C19C00",
                "#0037DA",
                "#881798",
                "#3A96DD",
                "#CCCCCC",
                "#767676",
                "#E74856",
                "#16C60C",
                "#F9F1A5",
                "#3B78FF",
                "#B4009E",
                "#61D6D6",
                "#F2F2F2"
            ]
        },
        {
            "name": "Solarized Dark",
            "foreground": "#FDF6E3",
            "background": "#073642",
            "colors": [
                "#073642",
                "#D30102",
                "#859900",
                "#B58900",
                "#268BD2",
                "#D33682",
                "#2AA198",
                "#EEE8D5",
                "#002B36",
                "#CB4B16",
                "#586E75",
                "#657B83",
                "#839496",
                "#6C71C4",
                "#93A1A1",
                "#FDF6E3"
            ]
        },
        {
            "name": "Solarized Light",
            "foreground": "#073642",
            "background": "#FDF6E3",
            "colors": [
                "#073642",
                "#D30102",
                "#859900",
                "#B58900",
                "#268BD2",
                "#D33682",
                "#2AA198",
                "#EEE8D5",
                "#002B36",
                "#CB4B16",
                "#586E75",
                "#657B83",
                "#839496",
                "#6C71C4",
                "#93A1A1",
                "#FDF6E3"
            ]
        }
    ]

    // Add any keybinding overrides to this array.
    // To unbind a default keybinding, set the command to "unbound"
    //"keybindings": []
}

3.安装zsh shell及powerline主题

安装zsh shell及powerline主题
step1、安装zsh step2、安装oh-my-zsh 通过 curl 或 wget 的安装curl方式: wget方式: step3、设置主题 1.下载oh-my-zs...

最后效果


参考文献:

添加Windows Terminal到鼠标右键菜单
Windows上有很多命令行程序,例如CMD和PowerShell。微软在Build 2019上推出了一款面向Windows10的命令行程序,这款程序集合了Windows上的...
黑科技抢先尝 - Windows全新终端初体验(附无需编译就能安装的Preview版本及代码Build全过程) - 大白技术控 - 博客园
大白技术控, windows terminal第一篇
黑科技抢先尝(续) - Windows terminal中WSL Linux 终端的极简美化指南 - 大白技术控 - 博客园
今天这篇文章,主要介绍如何美化 Windows terminal 中 WSL 的 Linux 终端,依然是以本人最熟悉的`Ubuntu`为例,其他版本的 Linux 请参考本文的流程换用对应的命令。假