Windows Terminal——安装并配置主题

简介: Windows Terminal——安装并配置主题

前言

官方文档 | 官方文档

GIT地址 | 项目地址

Windows 终端是一个面向命令行工具和 shell(如命令提示符、PowerShell 和适用于 Linux 的 Windows 子系统 (WSL))用户的新式终端应用程序。 它的主要功能包括多个选项卡、窗格、Unicode 和 UTF-8 字符支持、GPU 加速文本呈现引擎,还可以用于创建你自己的主题并自定义文本、颜色、背景和快捷键绑定。

步骤

安装终端

打开windows的商店——>搜索'Windows Terminal'——>进入到详情页——>点击'获取'(如果安装过那就是启动)

修改配置

安装完成后,打开终端进行配置

具体配置文件如下,剩下的我们直接在配置里面讲解主要为两种

  1. 直接在list中修改。
  2. schemes配置好,在list中引用。
// This file was initially generated by Windows Terminal 1.0.1401.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": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    // 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":
        {
            // 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": "PowerShell",
                "commandline": "powershell.exe",
                "hidden": false,
                "acrylicOpacity" : 0.75,
                "colorScheme" : "Solarized Dark", //这个配色的名称是为我们在schemes中配置的
                "fontFace" : "Consolas",
                "useAcrylic" : true //打开毛玻璃的效果
            },
            {
                // Make changes here to the cmd.exe profile.
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "name": "cmd",
                "commandline": "cmd.exe",
                "hidden": false,
                "acrylicOpacity" : 0.75, 
                "backgroundImage" : "E://图片//wallhaven-694674.jpg",  //背景图片
                "backgroundImageOpacity" : 0.5, //背景透明度
                "closeOnExit" : true,
                "cursorColor" : "#FFFFFF",
                "cursorShape" : "bar",
                "fontFace" : "Consolas",
                "fontSize" : 12,
                "historySize" : 9001,
                "padding" : "0, 0, 0, 0",
                "snapOnInput" : true,
                "startingDirectory" : "%USERPROFILE%",
                "tabTitle" : "cmd",
                "useAcrylic" : true
            },
            {
                "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
                "hidden": false,
                "name": "Ubuntu-18.04",
                "source": "Windows.Terminal.Wsl",
                "acrylicOpacity" : 0.75,
                "backgroundImage" : "E://图片//wallhaven-694674.jpg", 
                "backgroundImageOpacity" : 0.5,
                "closeOnExit" : true,
                "cursorShape" : "bar",
                "fontFace" : "Consolas",
                "fontSize" : 12,
                "historySize" : 9001,
                "padding" : "0, 0, 0, 0",
                "snapOnInput" : true,
                "startingDirectory" : "%USERPROFILE%",
                "tabTitle" : "Ubuntu-18.04",
                "useAcrylic" : true,
                "cursorColor": "#FFFFFF"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure",
                "acrylicOpacity" : 0.75,
                "backgroundImage" : "E://图片//wallhaven-694674.jpg", 
                "backgroundImageOpacity" : 0.5,
                "closeOnExit" : true,
                "cursorColor" : "#FFFFFF",
                "cursorShape" : "bar",
                "fontFace" : "Consolas",
                "fontSize" : 12,
                "historySize" : 9001,
                "padding" : "0, 0, 0, 0",
                "snapOnInput" : true,
                "startingDirectory" : "%USERPROFILE%",
                "tabTitle" : "Azure Cloud Shell",
                "useAcrylic" : true
            }
        ]
    },
    // Add custom color schemes to this array.
    // To learn more about color schemes, visit https://aka.ms/terminal-color-schemes
    //将我们所有的主题配色在这里写好,我们会在前面用到
        "schemes": [
            {
                "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 keybindings to this array.
    // To unbind a key combination from your defaults.json, set the command to "unbound".
    // To learn more about keybindings, visit https://aka.ms/terminal-keybindings
    "keybindings":
    [
        // 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" },
       
        //close active panle
        { "command": "closePane", "keys": "ctrl+shift+w" },
        // 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" }
    ]
}

学无止境,谦卑而行.

目录
相关文章
|
1月前
|
存储 负载均衡 Java
如何配置Windows主机MPIO多路径访问存储系统
Windows主机多路径(MPIO)是一种技术,用于在客户端计算机上配置多个路径到存储设备,以提高数据访问的可靠性和性能。本文以Windows2012 R2版本为例介绍如何在客户端主机和存储系统配置多路径访问。
88 13
如何配置Windows主机MPIO多路径访问存储系统
|
17天前
|
机器学习/深度学习 并行计算 异构计算
WINDOWS安装eiseg遇到的问题和解决方法
通过本文的详细步骤和问题解决方法,希望能帮助你顺利在 Windows 系统上安装和运行 EISeg。
38 2
|
25天前
|
网络安全 Windows
Windows server 2012R2系统安装远程桌面服务后无法多用户同时登录是什么原因?
【11月更文挑战第15天】本文介绍了在Windows Server 2012 R2中遇到的多用户无法同时登录远程桌面的问题及其解决方法,包括许可模式限制、组策略配置问题、远程桌面服务配置错误以及网络和防火墙问题四个方面的原因分析及对应的解决方案。
|
26天前
|
NoSQL Linux PHP
如何在不同操作系统上安装 Redis 服务器,包括 Linux 和 Windows 的具体步骤
本文介绍了如何在不同操作系统上安装 Redis 服务器,包括 Linux 和 Windows 的具体步骤。接着,对比了两种常用的 PHP Redis 客户端扩展:PhpRedis 和 Predis,详细说明了它们的安装方法及优缺点。最后,提供了使用 PhpRedis 和 Predis 在 PHP 中连接 Redis 服务器及进行字符串、列表、集合和哈希等数据类型的基本操作示例。
50 4
|
27天前
|
Dart 搜索推荐 IDE
Windows下Zed编辑器配置Dart环境
本文介绍了Dart编程语言及其主要框架Flutter的优势,并推荐使用轻量级编辑器Zed进行Dart开发。详细步骤包括Dart环境的安装与配置,Zed编辑器的安装与个性化设置,以及如何在Zed中编写并运行Dart的HelloWorld程序。通过自定义任务实现Dart文件的快速运行,提高了开发效率。
|
1月前
|
监控 安全 网络安全
Windows Server管理:配置与管理技巧
Windows Server管理:配置与管理技巧
70 3
|
2月前
|
数据安全/隐私保护 Windows
安装 Windows Server 2019
安装 Windows Server 2019
|
2月前
|
Windows
安装 Windows Server 2003
安装 Windows Server 2003
|
2月前
|
NoSQL Shell MongoDB
Windows 平台安装 MongoDB
10月更文挑战第10天
60 0
Windows 平台安装 MongoDB
|
2月前
|
Windows Python
Windows安装dlib,遇到问题汇总解决
Windows安装dlib,遇到问题汇总解决
83 4