Terminal美化

效果展示

安装Chocolatey

  • 如果未安装Git for Windows,请先参考 适用于 Windows 的 Git教程

  • 安装Chocolatey,并使用Chocolatey安装ConEmu,通过 PowerShell安装

    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
    

    安装时出现未能解析错误,请先参考解决方案

    报错示例:

    iwr : 未能解析此远程名称: 'raw.githubusercontent.com'
    所在位置 行:1 字符: 1
    + iwr -useb get.scoop.sh | iex
    + ~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest],WebException+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
    

    解决方法:

    # 修改host文件即可解决
    # 打开以下路径
    C:\Windows\System32\drivers\etc# 在最后一行后插入以下内容,保存再在powershell中执行安装choco命令
    199.232.68.133 raw.githubusercontent.com# 安装完成后即可删除临时插入的内容
    

安装 posh-git 以及 oh-my-posh

  • 使用 PowerShell,安装 Posh-Git 和 Oh-My-Posh:

    Install-Module posh-git -Scope CurrentUserInstall-Module oh-my-posh -Scope CurrentUser
    

配置PowerShell及主题

  • 用 powershell 生成配置文件

    # 为PowerShell生成一个自定义的Profile,用来配置PowerShell
    if(!(Test-Path -Path $PROFILE)) { New-Item -Type File -Path $PROFILE -Force }# 用记事本打开上面的文件,PowerShell中输入
    notepad $PROFILE
    
    # 在打开的记事本中插入以下内容并保存
    Import-Module posh-gitImport-Module oh-my-posh
    # powerlevel10k_rainbow指设置的主题名
    Set-PoshPrompt -Theme powerlevel10k_rainbow
    

    Terminal主题参考

    # 修改powershell的执行策略,确保上面的配置能够生效,在powershell中执行
    set-executionpolicy remotesigned
    

字体下载

Meslo字体下载

字体最终选择MesloLGSDZ NF,用以支持powershell的oh-my-posh主题中的特殊字符

安装Windows Terminal

  • 打开Microsoft Store,搜索Windows Terminal点击获取即可

配置Terminal

打开Terminal,打开配置,编辑JSON文件

将原先json文件内容清空,并粘贴以下内容

{"$schema": "https://aka.ms/terminal-profiles-schema","actions": [{"command": {"action": "newTab"},"keys": "ctrl+n"},{"command": "paste","keys": "ctrl+v"},{"command": "duplicateTab","keys": "ctrl+shift+d"},{"command": {"action": "closeTab"}},{"command": "closePane","keys": "ctrl+w"},{"command": "find","keys": "ctrl+f"},{"command": {"action": "copy"},"keys": "ctrl+c"},{"command": "unbound","keys": "alt+-"},{"command": "unbound","keys": "alt+plus"},{"command": "unbound","keys": "ctrl+]"},{"command": "unbound","keys": "ctrl+["},{"command": "unbound","keys": "ctrl+shift+1"},{"command": "unbound","keys": "ctrl+shift+2"},{"command": "unbound","keys": "ctrl+shift+3"},{"command": "unbound","keys": "ctrl+shift+4"},{"command": "unbound","keys": "ctrl+shift+5"},{"command": "unbound","keys": "ctrl+shift+6"},{"command": "unbound","keys": "ctrl+shift+7"},{"command": "unbound","keys": "ctrl+shift+8"},{"command": "unbound","keys": "ctrl+shift+9"},{"command": "unbound","keys": "ctrl+alt+1"},{"command": "unbound","keys": "ctrl+alt+2"},{"command": "unbound","keys": "ctrl+alt+3"},{"command": "unbound","keys": "ctrl+alt+4"},{"command": "unbound","keys": "ctrl+alt+5"},{"command": "unbound","keys": "ctrl+alt+6"},{"command": "unbound","keys": "ctrl+alt+7"},{"command": "unbound","keys": "ctrl+alt+8"},{"command": "unbound","keys": "ctrl+alt+9"},{"command": "openNewTabDropdown","keys": "ctrl+shift+space"},{"command": {"action": "scrollDown"},"keys": "ctrl+shift+down"},{"command": {"action": "openSettings"},"keys": "ctrl+,"},{"command": {"action": "nextTab"},"keys": "ctrl+tab"},{"command": {"action": "prevTab"},"keys": "ctrl+shift+tab"},{"command": {"action": "scrollUp"},"keys": "ctrl+shift+up"},{"command": "scrollUpPage","keys": "pgup"},{"command": "scrollDownPage","keys": "pgdn"},{"command": {"action": "splitPane","split": "auto","splitMode": "duplicate"},"keys": "alt+shift+d"}],"alwaysShowTabs": true,"copyFormatting": "none","copyOnSelect": false,"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}","focusFollowMouse": true,"initialCols": 120,"initialRows": 30,"profiles": {"defaults": {},"list": [{"acrylicOpacity": 0.75,"closeOnExit": "graceful","colorScheme": "Campbell","commandline": "powershell.exe","cursorColor": "#FFFFFF","cursorShape": "bar","font": {"face": "MesloLGSDZ NF","size": 14},"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}","hidden": false,"historySize": 9001,"name": "Windows PowerShell","padding": "0, 0, 0, 0","snapOnInput": true,"useAcrylic": true},{"acrylicOpacity": 0.65000000000000002,"closeOnExit": "graceful","colorScheme": "UbuntuLegit","commandline": "cmd.exe","cursorColor": "#FFFFFF","cursorShape": "bar","font": {"face": "Sarasa Term SC","size": 13},"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}","hidden": false,"historySize": 9001,"name": "cmd","padding": "0, 0, 0, 0","snapOnInput": true,"startingDirectory": "%Workspaces%","useAcrylic": true},{"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}","hidden": false,"name": "Azure Cloud Shell","source": "Windows.Terminal.Azure"}]},"schemes": [{"background": "#161719","black": "#000000","blue": "#85BEFD","brightBlack": "#000000","brightBlue": "#96CBFE","brightCyan": "#85BEFD","brightGreen": "#94FA36","brightPurple": "#B9B6FC","brightRed": "#FD5FF1","brightWhite": "#E0E0E0","brightYellow": "#F5FFA8","cursorColor": "#FFFFFF","cyan": "#85BEFD","foreground": "#C5C8C6","green": "#87C38A","name": "Atom","purple": "#B9B6FC","red": "#FD5FF1","selectionBackground": "#FFFFFF","white": "#E0E0E0","yellow": "#FFD7B1"},{"background": "#0C0C0C","black": "#0C0C0C","blue": "#0037DA","brightBlack": "#767676","brightBlue": "#3B78FF","brightCyan": "#61D6D6","brightGreen": "#16C60C","brightPurple": "#B4009E","brightRed": "#E74856","brightWhite": "#F2F2F2","brightYellow": "#F9F1A5","cursorColor": "#FFFFFF","cyan": "#3A96DD","foreground": "#CCCCCC","green": "#13A10E","name": "Campbell","purple": "#881798","red": "#C50F1F","selectionBackground": "#FFFFFF","white": "#CCCCCC","yellow": "#C19C00"},{"background": "#012456","black": "#0C0C0C","blue": "#0037DA","brightBlack": "#767676","brightBlue": "#3B78FF","brightCyan": "#61D6D6","brightGreen": "#16C60C","brightPurple": "#B4009E","brightRed": "#E74856","brightWhite": "#F2F2F2","brightYellow": "#F9F1A5","cursorColor": "#FFFFFF","cyan": "#3A96DD","foreground": "#CCCCCC","green": "#13A10E","name": "Campbell Powershell","purple": "#881798","red": "#C50F1F","selectionBackground": "#FFFFFF","white": "#CCCCCC","yellow": "#C19C00"},{"background": "#282A36","black": "#21222C","blue": "#F1FA8C","brightBlack": "#6272A4","brightBlue": "#D6ACFF","brightCyan": "#A4FFFF","brightGreen": "#69FF94","brightPurple": "#FF92DF","brightRed": "#FF6E6E","brightWhite": "#FFFFFF","brightYellow": "#FFFFA5","cursorColor": "#FFFFFF","cyan": "#8BE9FD","foreground": "#F8F8F2","green": "#50FA7B","name": "Dracula","purple": "#BD93F9","red": "#FF5555","selectionBackground": "#FFFFFF","white": "#F8F8F2","yellow": "#F1FA8C"},{"background": "#1A1A1A","black": "#282C34","blue": "#61AFEF","brightBlack": "#5A6374","brightBlue": "#61AFEF","brightCyan": "#56B6C2","brightGreen": "#19A33A","brightPurple": "#C678DD","brightRed": "#E06C75","brightWhite": "#DCDFE4","brightYellow": "#E5C07B","cursorColor": "#FFFFFF","cyan": "#56B6C2","foreground": "#DCDFE4","green": "#19A33A","name": "Git Flat UI","purple": "#C678DD","red": "#E06C75","selectionBackground": "#FFFFFF","white": "#DCDFE4","yellow": "#E5C07B"},{"background": "#282C34","black": "#282C34","blue": "#61AFEF","brightBlack": "#5A6374","brightBlue": "#61AFEF","brightCyan": "#56B6C2","brightGreen": "#98C379","brightPurple": "#C678DD","brightRed": "#E06C75","brightWhite": "#DCDFE4","brightYellow": "#E5C07B","cursorColor": "#FFFFFF","cyan": "#56B6C2","foreground": "#DCDFE4","green": "#98C379","name": "One Half Dark","purple": "#C678DD","red": "#E06C75","selectionBackground": "#FFFFFF","white": "#DCDFE4","yellow": "#E5C07B"},{"background": "#FAFAFA","black": "#383A42","blue": "#0184BC","brightBlack": "#4F525D","brightBlue": "#61AFEF","brightCyan": "#56B5C1","brightGreen": "#98C379","brightPurple": "#C577DD","brightRed": "#DF6C75","brightWhite": "#FFFFFF","brightYellow": "#E4C07A","cursorColor": "#4F525D","cyan": "#0997B3","foreground": "#383A42","green": "#50A14F","name": "One Half Light","purple": "#A626A4","red": "#E45649","selectionBackground": "#FFFFFF","white": "#FAFAFA","yellow": "#C18301"},{"background": "#002B36","black": "#002B36","blue": "#268BD2","brightBlack": "#073642","brightBlue": "#839496","brightCyan": "#93A1A1","brightGreen": "#586E75","brightPurple": "#6C71C4","brightRed": "#CB4B16","brightWhite": "#FDF6E3","brightYellow": "#657B83","cursorColor": "#FFFFFF","cyan": "#2AA198","foreground": "#839496","green": "#859900","name": "Solarized Dark","purple": "#D33682","red": "#DC322F","selectionBackground": "#FFFFFF","white": "#EEE8D5","yellow": "#B58900"},{"background": "#FDF6E3","black": "#002B36","blue": "#268BD2","brightBlack": "#073642","brightBlue": "#839496","brightCyan": "#93A1A1","brightGreen": "#586E75","brightPurple": "#6C71C4","brightRed": "#CB4B16","brightWhite": "#FDF6E3","brightYellow": "#657B83","cursorColor": "#002B36","cyan": "#2AA198","foreground": "#657B83","green": "#859900","name": "Solarized Light","purple": "#D33682","red": "#DC322F","selectionBackground": "#FFFFFF","white": "#EEE8D5","yellow": "#B58900"},{"background": "#000000","black": "#000000","blue": "#3465A4","brightBlack": "#555753","brightBlue": "#729FCF","brightCyan": "#34E2E2","brightGreen": "#8AE234","brightPurple": "#AD7FA8","brightRed": "#EF2929","brightWhite": "#EEEEEC","brightYellow": "#FCE94F","cursorColor": "#FFFFFF","cyan": "#06989A","foreground": "#D3D7CF","green": "#4E9A06","name": "Tango Dark","purple": "#75507B","red": "#CC0000","selectionBackground": "#FFFFFF","white": "#D3D7CF","yellow": "#C4A000"},{"background": "#FFFFFF","black": "#000000","blue": "#3465A4","brightBlack": "#555753","brightBlue": "#729FCF","brightCyan": "#34E2E2","brightGreen": "#8AE234","brightPurple": "#AD7FA8","brightRed": "#EF2929","brightWhite": "#EEEEEC","brightYellow": "#FCE94F","cursorColor": "#000000","cyan": "#06989A","foreground": "#555753","green": "#4E9A06","name": "Tango Light","purple": "#75507B","red": "#CC0000","selectionBackground": "#FFFFFF","white": "#D3D7CF","yellow": "#C4A000"},{"background": "#2C001E","black": "#4E9A06","blue": "#3465A4","brightBlack": "#555753","brightBlue": "#729FCF","brightCyan": "#34E2E2","brightGreen": "#8AE234","brightPurple": "#AD7FA8","brightRed": "#EF2929","brightWhite": "#EEEEEE","brightYellow": "#FCE94F","cursorColor": "#FFFFFF","cyan": "#06989A","foreground": "#EEEEEE","green": "#300A24","name": "UbuntuLegit","purple": "#75507B","red": "#CC0000","selectionBackground": "#FFFFFF","white": "#D3D7CF","yellow": "#C4A000"},{"background": "#000000","black": "#000000","blue": "#000080","brightBlack": "#808080","brightBlue": "#0000FF","brightCyan": "#00FFFF","brightGreen": "#00FF00","brightPurple": "#FF00FF","brightRed": "#FF0000","brightWhite": "#FFFFFF","brightYellow": "#FFFF00","cursorColor": "#FFFFFF","cyan": "#008080","foreground": "#C0C0C0","green": "#008000","name": "Vintage","purple": "#800080","red": "#800000","selectionBackground": "#FFFFFF","white": "#C0C0C0","yellow": "#808000"}],"showTabsInTitlebar": true,"showTerminalTitleInTitlebar": true
}

Windows Terminal美化相关推荐

  1. Windows Terminal美化:oh-my-posh配置记录

    Windows Terminal美化:oh-my-posh配置记录 前置:安装Windows Terminal + powershell,打开终端,默认路径为powershell. 这个流程踩了不少坑 ...

  2. Windows Terminal美化杂记-Windows Terminal使用与配置

    文章目录 Windows Terminal 前言 原cmd Windows Terminal 安装Terminal 配置 配置代码部分 配置字体部分 配置右键添加 测试常量 命令行中执行 管理员权限运 ...

  3. Windows Terminal 美化教程

    一.PowerShell美化 1.安装新款 PowerShell 点击下载新款 PowerShell 用管理员模式打开刚装好的新版 powershell,依次安装以下软件 2.安装 PSReadLin ...

  4. 【工具】Windows Terminal美化(oh-my-posh3)

    目录 一.安装主题 [^1] 二.编辑相应配置文件 [^2] 三.安装Nerd Fonts字体并应用[^3] 四.在vscode中power shell样式(可选) 前一段时间想美化一下Windows ...

  5. Windows Terminal 美化 / PowerShell 美化: oh-my-posh 主题安装和使用

    关键词: nerd-font; oh-my-posh; posh; powerline-font; powershell; scoop; winget 最终效果预览 说明事项 本文与网络上多数介绍 o ...

  6. 黑科技抢先尝(续2) - Windows terminal中Powershell Tab的美化全攻略

    温馨提示: 原文中含有一些外部链接,点击全文左下角的"阅读原文"体验会更佳喔~  接着之前的文章 黑科技抢先尝(续) - Windows terminal中WSL Linux 终端 ...

  7. 黑科技抢先尝(续) - Windows terminal中WSL Linux 终端的极简美化指南

    之前,本人写了两篇文章 黑科技抢先尝 | Windows全新终端初体验(附代码Build全过程) 和 程会玩 | 无需自行编译也能玩转 Windows Terminal,介绍了玩转Windows te ...

  8. 搭建最炫酷的 Windows Terminal 全新命令行更新以及美化指南 微软新版终端工具安装美化教程

    Windows发布了最新的Windows Terminal命令行工具,拜托了以前的黑色的边框以及一些缺点,我们先来预览一下效果吧 这是我修改保存之后的命令行工具 不仅可以支持快捷键操作还支持自定义快捷 ...

  9. 告别黑白CMD PowerShell + Windows Terminal 终端美化

    Windows Terminal 只支持 Windows 1903 以上的版本,如果你的电脑未升级,可以退出浏览了. 软件介绍与安装 在微软商店下载下载 PowerShell 和 Windows Te ...

最新文章

  1. 某米浏览器黑名单文件破解
  2. 程序员在囧途之做私活小记
  3. Mac003--Maven安装与环境变量配置
  4. Android踩坑日记:RecyclerView中EditText和ImageView的ViewHolder复用坑
  5. Pandas库(2):数据的统计分析
  6. 浅谈Reactor 线程模型
  7. 海德汉编程详细手册_UG编程海德汉系统螺旋铣孔最后一刀欠切解决方案
  8. CSS, JavaScript, jQuery实现标签页切换
  9. Android Studio 教程(1)----配置
  10. 在Ubuntu 14.04平台上利用Intel的GPU实现硬件加速--基于VAAPI
  11. python在预算执行审计中的应用_重庆万州:运用“大数据+” 预算执行审计取得成效...
  12. springboot在线银行贷款系统毕业设计源码281444
  13. javaweb超市商品库存信息管理系统报告
  14. [转]file_get_contents(php://input)
  15. python库声纹_什么是声纹数据库?
  16. UVM—virtual sequencer and virtual sequence详解
  17. 2021年茶艺师(中级)考试及茶艺师(中级)实操考试视频
  18. C语言的精华——指针 指针初识
  19. 如何保持微信公众号的粉丝黏度?
  20. 从明天起,做一个幸福的人

热门文章

  1. 贪吃蛇python撞墙不死_不敢相信,60行python代码就写出了贪吃蛇游戏
  2. Java并发编程技术大纲
  3. fidder抓包工具使用方法,完整流程
  4. 高仿QQ运动的周报界面
  5. nmn的副作用是真实的吗,nmn的副作用整理,共鸣感拉满了
  6. easyExcel导出和读取
  7. 微赞平台拼团插件的支付流程
  8. 使用重心坐标插值三角形顶点的任何属性
  9. 网络连接错误代码大全及处理办法
  10. CANOe系列讲解 - CANOe基础知识介绍