Windows Terminal配置

  • 一、安装
  • 二、默认终端配置
  • ~~三、配置在当前文件打开终端~~(现在安装之后好像Terminal之后好像是自动配置的,不用人工配置)
    • 1、右键打开
    • 2、设置打开Terminal为当前目录
  • 四、主题
  • 五、完整版配置文件

最近在windows上用安装了centos子系统,并配置了Windows Terminal,记录一下过程。

一、安装

​ 因为重点是在配置Windows Terminal,所以这点就忽略了,直接在微软商店下载安装centos与Terminal

​ 记得在 控制面板->程序->启用或关闭windows功能下将适用于Linux的windows子系统勾选

二、默认终端配置

在安装后Windows Terminal之后,打开默认是cmd终端,现在配置为打开默认子系统centos
打开Windows Terminal设置(json格式)
这里贴出一部分主要配置

"defaultProfile": "{4d4cc780-cacb-5b6f-a183-29b5f6cdcd23}","profiles":{"defaults":{// Put settings here that you want to apply to all profiles."acrylicOpacity": 0.1, //背景透明度(0-1)"colorScheme": "Breeze", //主题名字//"fontFace": "Fira Mono for Powerline","fontFace": "DejaVu Sans Mono for Powerline","fontSize": 13},"list":[{// Make changes here to the powershell.exe profile."guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}","name": "Windows PowerShell","commandline": "powershell.exe","hidden": false},{// Make changes here to the cmd.exe profile."guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}","name": "Command Prompt","commandline": "cmd.exe","hidden": false},{"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}","hidden": false,"name": "Ubuntu","source": "Windows.Terminal.Wsl"},{"guid": "{4d4cc780-cacb-5b6f-a183-29b5f6cdcd23}","hidden": false,"name": "CentOS","source": "Windows.Terminal.Wsl","startingDirectory" : "."},{"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}","hidden": false,"name": "Azure Cloud Shell","source": "Windows.Terminal.Azure"}]},

defaults表示默认配置,即每个中的都会采取的配置(cmd、powershell或者是子系统shell)
defaultProfile表示当前的默认打开终端,值是一串数字,是终端的guid
list中就是每个终端的信息
要更改默认终端,将defaultProfile修改为list中想要的终端的guid值即可
如上,我现在的默认终端是CentOS,将defaultProfile修改为{4d4cc780-cacb-5b6f-a183-29b5f6cdcd23}即可

三、配置在当前文件打开终端(现在安装之后好像Terminal之后好像是自动配置的,不用人工配置)

实现如下功能:
右键->打开终端,终端路径是当前位置

1、右键打开

将以下图标下载,放入以下文件夹中(没有就新建)
C:\Users\tomorrow\AppData\Local\terminal
tomorrow 是用户名,需要改成自己的用户名

将图标名字修改为terminal.ico

新建文本文件

Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="Windows terminal here"
"Icon"="%USERPROFILE%\\AppData\\Local\\terminal\\terminal.ico"[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@="C:\Users\tomorrow\AppData\Local\Microsoft\WindowsApps\wt.exe"

依然将最后一句的tomorrow改为自己用户名
完成后命名为terminal.reg 双击即可
此时右键可以代打开terminal

2、设置打开Terminal为当前目录

在配置文件中配置,只需要添加一个字段startingDirectory便可
可以在默认的defaults中添加,也可以在list中对应的终端配置添加,我这里是后者

            {"guid": "{4d4cc780-cacb-5b6f-a183-29b5f6cdcd23}","hidden": false,"name": "CentOS","source": "Windows.Terminal.Wsl","startingDirectory" : "."}

添加了 “startingDirectory” : “.” 此时右键打开便是当前目录

四、主题

Windows Terminal Themes
网站有很多主题,选择喜欢的,将配置复制下面,放入自己的配置
如我的配置如下:

"schemes": [{"name": "Breeze","black": "#31363b","red": "#ed1515","green": "#11d116","yellow": "#f67400","blue": "#1d99f3","purple": "#9b59b6","cyan": "#1abc9c","white": "#eff0f1","brightBlack": "#7f8c8d","brightRed": "#c0392b","brightGreen": "#1cdc9a","brightYellow": "#fdbc4b","brightBlue": "#3daee9","brightPurple": "#8e44ad","brightCyan": "#16a085","brightWhite": "#fcfcfc","background": "#31363b","foreground": "#eff0f1"}],

再在defaults字段中的colorScheme填上主题名

 "defaults":{// Put settings here that you want to apply to all profiles."acrylicOpacity": 0.1, //背景透明度(0-1)"colorScheme": "Breeze", //主题名字//"fontFace": "Fira Mono for Powerline","fontFace": "DejaVu Sans Mono for Powerline","fontSize": 13},

五、完整版配置文件

仅供参考

// This file was initially generated by Windows Terminal 1.4.3243.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": "{4d4cc780-cacb-5b6f-a183-29b5f6cdcd23}",// 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."acrylicOpacity": 0.1, //背景透明度(0-1)"colorScheme": "Breeze", //主题名字//"fontFace": "Fira Mono for Powerline","fontFace": "DejaVu Sans Mono for Powerline","fontSize": 13},"list":[{// Make changes here to the powershell.exe profile."guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}","name": "Windows PowerShell","commandline": "powershell.exe","hidden": false},{// Make changes here to the cmd.exe profile."guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}","name": "Command Prompt","commandline": "cmd.exe","hidden": false},{"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}","hidden": false,"name": "Ubuntu","source": "Windows.Terminal.Wsl"},{"guid": "{4d4cc780-cacb-5b6f-a183-29b5f6cdcd23}","hidden": false,"name": "CentOS","source": "Windows.Terminal.Wsl","startingDirectory" : "."},{"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}","hidden": false,"name": "Azure Cloud Shell","source": "Windows.Terminal.Azure"}]},// Add custom color schemes to this array.// To learn more about color schemes, visit https://aka.ms/terminal-color-schemes"schemes": [{"name": "Breeze","black": "#31363b","red": "#ed1515","green": "#11d116","yellow": "#f67400","blue": "#1d99f3","purple": "#9b59b6","cyan": "#1abc9c","white": "#eff0f1","brightBlack": "#7f8c8d","brightRed": "#c0392b","brightGreen": "#1cdc9a","brightYellow": "#fdbc4b","brightBlue": "#3daee9","brightPurple": "#8e44ad","brightCyan": "#16a085","brightWhite": "#fcfcfc","background": "#31363b","foreground": "#eff0f1"}],// 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" }]
}

Windows Terminal配置相关推荐

  1. Windows Terminal 配置GIT

    Windows Terminal 配置GIT 一.打开设置 找到该位置 json串中添加以下代码 {"acrylicOpacity": 0, // 透明度"closeOn ...

  2. Windows Terminal配置Git

    文章目录 Windows Terminal配置Git 效果 下载和安装 配置Windows Terminal 配置其它命令行 Windows Terminal配置Git 效果 先上效果图: 下载和安装 ...

  3. 我的Windows Terminal 配置(带注释,附配置文件下载)

    Windows Terminal 配置(带注释,附配置文件下载,更新于2020.5.3) 前言 详细配置(更新于2020.05.03) 前言 windows terminal的确是好用之极的终端工具, ...

  4. Windows Terminal 配置文件+图形化配置界面+右键菜单+管理员权限

    Windows Terminal 配置 Windows Terminal 是一个面向命令行工具和 shell(如命令提示符.PowerShell 和适用于 Linux 的 Windows 子系统 (W ...

  5. Windows Terminal PowerShell 7 美化

    记录一下有关Windows Terminal的折腾记录. 一.最后的成果图 二.Windows Terminal & PowerShell安装 1.Windows Store 直接搜索进行下载 ...

  6. windows terminal agnoster 主题乱码问题

    在 windows terminal 配置好 zsh 和 主题 agnoster 后,发现存在乱码问题: 原主题的箭头符号无法正常显示,尝试在终端下载字体:https://github.com/pow ...

  7. Windows Terminal 完全配置教程(主题以及启动设置)

    一.安装Windows terminal Microsoft Store搜索Windows terminal 第一个和第二个都可以!! 二.选择主题 Windows terminal提供了大量的主题可 ...

  8. Windows Terminal + WSL2 + CENTOS 配置Windows命令终端

    本文主要用于记录在Windows上使用WSL2和centos系统打造一个免费高效的shell终端的配置过程以及界面优化过程. 1.选型分析 之前一直都是使用termius和windows来进行ssh管 ...

  9. 酷炫cmd命令行工具——windows terminal的详细配置

    官网配置地址:An overview on Windows Terminal | Microsoft Docs 目录 一.Windows terminal安装与基本操作 1.Windows Termi ...

最新文章

  1. linux 文本行倒叙,Linux基础(4)之文本处理
  2. KDD Cup 2021城市大脑赛题解析!报名倒计时3天
  3. Mac下python初学之Image库(PIL)
  4. 如何进行大数据分析及处理?
  5. Synchronization (computer science)
  6. Android 开发工具类 13_ SaxService
  7. 2014年中国互联网的50大预测
  8. Mouse Without Borders 一套鼠标键盘控制多台电脑
  9. php用于字符串函数是,php中用于查找字符串的常用函数
  10. Win10错误代码0x80070541是怎么回事
  11. 【论文分享】ACL 2020 信息抽取与问答系统
  12. python闭包的延迟绑定_Python延迟绑定问题原理及解决方案
  13. ANIMATION经典小车动画
  14. C++实现双线性插值
  15. 《SEM长尾搜索营销策略解密》一一2.10 小领域文化进入红利期
  16. PAT 1068 万绿丛中一点红
  17. OC_AddressBook_通讯录
  18. Visual Tracking via Adaptive Structural Local Sparse Appearance Model
  19. excel快捷键设置
  20. 金项奖入围展播 | 梦系来客,星耀有礼

热门文章

  1. 描述汇集天地之灵气的上道下器
  2. Win8Metro(C#)数字图像处理--2.26图像减法
  3. mac下vscode代码格式化及其他常用快捷键
  4. 计算机软件操作试题多选,2016职称计算机考试WPS_Office多选试题及答案
  5. linux环境下gitea使用,linux一键安装gitea
  6. centos7 安装gitea使用
  7. 她笔下的水墨世界令人赞叹,中国风海报沉浸式国风体验
  8. 2022年G2电站锅炉司炉操作证考试题库及在线模拟考试
  9. 微信小程序中base64转换成图片
  10. 嵌入式linux学习笔记--gitlab学习笔记-gitlab-runnner简单的使用介绍