windows terminal新特性学习

1. 主题美化篇

方案一:使用现成主题

直接复制大佬的主题是最方便的

在这里插入图片描述

  • 打开设置粘贴一下上面选好的主题即可

在这里插入图片描述

  1. 打开设置
  2. 复制一个主题
  3. 粘贴在schemes标签下。其中name属性就是这个主题的名字。

注意每一个主题之间使用英文逗号隔开

在这里插入图片描述
4. 在default标签下加上"colorScheme": "Wombat"。指定默认的主题,这里的名字选择主题name属性后的名字。
在这里插入图片描述
5. 保存设置即可看到变化

在这里插入图片描述

方法二:完全自定义

配置Windows终端的一种方法(目前唯一的方法)是编辑的设置。json文件的设置。

  • windows terminal 的 github主页
  • 首先我们到GitHub下载terminal的源代码
  • 然后在源代码里面的doc里可以看到配置文件的说明
    在这里插入图片描述
    查阅手册,修改自己想要修改的东西即可。下来我备注一下我查阅的常用的修改。

全局设置

这些设置定义启动默认值,以及可能的应用程序范围的设置不影响特定的终端实例。

这些全局属性应该存在于根json对象中。

profiles常见设置

概要文件包含打开新的WT选项卡时应用的设置。每个配置文件由一个GUID标识,幷包含许多其他字段。guid属性是配置文件的唯一标识符。如果多个配置文件都具有相同的guid值,您可能会看到意想不到的情况的行为。


//  background 背景色

// `backgroundImage` 背景图

// `backgroundImageAlignment` 背景图对齐方式 `"center"`, `"left"`, `"top"`, `"right"`, `"bottom"`, `"topLeft"`, `"topRight"`, `"bottomLeft"`, `"bottomRight"`

// `backgroundImageOpacity` 背景图透明度 0-1之间

// `backgroundImageStretchMode` 背景图填充方式 `"none"`, `"fill"`, `"uniform"`, `"uniformToFill"`

//  `colorScheme` 选择一个配色方案

//  `cursorColor` 设置光标的颜色

// cursorShape      光标的形状 

// `foreground` 前景色

//  `historySize` 最大历史数目

Schemes常见设置

每个方案定义用于各种终端转义序列的颜色值。每个模式都由name字段标识。例子包括

Property Necessity Type Description
name Required String Name of the color scheme.
foreground Required String Sets the foreground color of the color scheme.
background Required String Sets the background color of the color scheme.
selectionBackground Optional String Sets the selection background color of the color scheme.
cursorColor Optional String Sets the cursor color of the color scheme.
black Required String Sets the color used as ANSI black.
blue Required String Sets the color used as ANSI blue.
brightBlack Required String Sets the color used as ANSI bright black.
brightBlue Required String Sets the color used as ANSI bright blue.
brightCyan Required String Sets the color used as ANSI bright cyan.
brightGreen Required String Sets the color used as ANSI bright green.
brightPurple Required String Sets the color used as ANSI bright purple.
brightRed Required String Sets the color used as ANSI bright red.
brightWhite Required String Sets the color used as ANSI bright white.
brightYellow Required String Sets the color used as ANSI bright yellow.
cyan Required String Sets the color used as ANSI cyan.
green Required String Sets the color used as ANSI green.
purple Required String Sets the color used as ANSI purple.
red Required String Sets the color used as ANSI red.
white Required String Sets the color used as ANSI white.
yellow Required String Sets the color used as ANSI yellow.

题主的个人设置分享

  • 背景图设置

注:设置背景图片需要关闭毛玻璃样式,设置"useAcrylic":false

"backgroundImage" : "T://2.jpg",  # 背景图片地址
"backgroundImageOpacity" : 0.9  #透明度
  • 个人设置
    defaults标签
  "defaults":
  {
      // Put settings here that you want to apply to all profiles.
      "colorScheme": "Wombat",
      "backgroundImage": "C:\\Users\\cds\\Pictures\\壁纸\\1.jpg",
      "backgroundImageOpacity": 0.3
  },
  • 颜色主题
{
    "name": "Wombat",
    "black": "#000000",
    "red": "#ff615a",
    "green": "#b1e969",
    "yellow": "#ebd99c",
    "blue": "#5da9f6",
    "purple": "#e86aff",
    "cyan": "#82fff7",
    "white": "#dedacf",
    "brightBlack": "#313131",
    "brightRed": "#f58c80",
    "brightGreen": "#ddf88f",
    "brightYellow": "#eee5b2",
    "brightBlue": "#a5c7ff",
    "brightPurple": "#ddaaff",
    "brightCyan": "#b7fff9",
    "brightWhite": "#ffffff",
    "background": "#171717",
    "foreground": "#dedacf"
  },
  • 效果
    在这里插入图片描述

2. 常用设置篇

修改默认启动的bash

将图中标注的属性进行对应即可。其中这个guid属性可以理解为bash的身份证号,将默认文件设置为想要设置为默认bash的”身份证“号即可。
在这里插入图片描述

2.2 分屏操作

  • 在新版本中,分屏快捷键如下:

    水平分屏:Alt + Shift + 减号

    垂直分屏:Alt + Shift + 加号
    在这里插入图片描述

  • 其它分屏

{ "command": { "action": "moveFocus", "direction":"down" }, "keys": [ "alt+down" ] },
{ "command": { "action": "moveFocus", "direction":"left" }, "keys": [ "alt+left" ] },
{ "command": { "action": "moveFocus", "direction":"right" }, "keys": [ "alt+right" ] },
{ "command": { "action": "moveFocus", "direction":"up" }, "keys": [ "alt+up" ] },
{ "command": { "action": "resizePane", "direction":"down" }, "keys": [ "alt+shift+down" ] },
{ "command": { "action": "resizePane", "direction":"left" }, "keys": [ "alt+shift+left" ] },
{ "command": { "action": "resizePane", "direction":"right" }, "keys": [ "alt+shift+right" ] },
{ "command": { "action": "resizePane", "direction":"up" }, "keys": [ "alt+shift+up" ] },
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章