Windows Terminal美化
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美化相关推荐
- Windows Terminal美化:oh-my-posh配置记录
Windows Terminal美化:oh-my-posh配置记录 前置:安装Windows Terminal + powershell,打开终端,默认路径为powershell. 这个流程踩了不少坑 ...
- Windows Terminal美化杂记-Windows Terminal使用与配置
文章目录 Windows Terminal 前言 原cmd Windows Terminal 安装Terminal 配置 配置代码部分 配置字体部分 配置右键添加 测试常量 命令行中执行 管理员权限运 ...
- Windows Terminal 美化教程
一.PowerShell美化 1.安装新款 PowerShell 点击下载新款 PowerShell 用管理员模式打开刚装好的新版 powershell,依次安装以下软件 2.安装 PSReadLin ...
- 【工具】Windows Terminal美化(oh-my-posh3)
目录 一.安装主题 [^1] 二.编辑相应配置文件 [^2] 三.安装Nerd Fonts字体并应用[^3] 四.在vscode中power shell样式(可选) 前一段时间想美化一下Windows ...
- Windows Terminal 美化 / PowerShell 美化: oh-my-posh 主题安装和使用
关键词: nerd-font; oh-my-posh; posh; powerline-font; powershell; scoop; winget 最终效果预览 说明事项 本文与网络上多数介绍 o ...
- 黑科技抢先尝(续2) - Windows terminal中Powershell Tab的美化全攻略
温馨提示: 原文中含有一些外部链接,点击全文左下角的"阅读原文"体验会更佳喔~ 接着之前的文章 黑科技抢先尝(续) - Windows terminal中WSL Linux 终端 ...
- 黑科技抢先尝(续) - Windows terminal中WSL Linux 终端的极简美化指南
之前,本人写了两篇文章 黑科技抢先尝 | Windows全新终端初体验(附代码Build全过程) 和 程会玩 | 无需自行编译也能玩转 Windows Terminal,介绍了玩转Windows te ...
- 搭建最炫酷的 Windows Terminal 全新命令行更新以及美化指南 微软新版终端工具安装美化教程
Windows发布了最新的Windows Terminal命令行工具,拜托了以前的黑色的边框以及一些缺点,我们先来预览一下效果吧 这是我修改保存之后的命令行工具 不仅可以支持快捷键操作还支持自定义快捷 ...
- 告别黑白CMD PowerShell + Windows Terminal 终端美化
Windows Terminal 只支持 Windows 1903 以上的版本,如果你的电脑未升级,可以退出浏览了. 软件介绍与安装 在微软商店下载下载 PowerShell 和 Windows Te ...
最新文章
- asp.net实现在网页上自动显示超链接以及Email地址
- oracle 主机名改ip,[oracle 10.2]主机名或者IP地址改变造成的dbconsole服务无法启动解决...
- lazada选品,东南亚韩潮周边产品爆卖,单日销售额5万美金!
- 油井在哪_身边榜样 | 张景岗:“油井越‘生气,自己越开心”
- Chillingo分享三款游戏图标的设计经验
- Zeppelin-源码编译
- [MEGA DEAL] Ultimate SQL Bootcamp认证捆绑包(98%)
- 前端学习(3056):vue+element今日头条管理-反馈
- jsonp请求html页面,JavaScript中的JSON和JSONP
- 12. OD-XOFTSPY监控系统软件,通过windows API进行破解(双重验证,聪明的加密师)
- Hibernate关联关系映射-----单向一对一映射配置
- java 线程百科_Java并发——线程介绍
- flex中list或Combox中的子项上移下移操作
- 《统计学》第八版贾俊平第二章课后习题及答案总结
- 【GPU结构与CUDA系列0】背景知识:GFLOPS,带宽,延迟和吞吐量,乱序执行,上下文切换,指令集体系结构
- jsp中input 隐藏的方法
- 《CODE》读后笔记——第14~20章
- gentoo php,Gentoo安装php7
- win10锁屏壁纸的提取方法
- 【NOIP2017提高A组集训10.25】嘟嘟噜
热门文章
- 科技云报道:疫情三年,数字会展成色几何?
- web2.0之后是什么
- java程序重启_如何使您的Java应用程序重新启动
- Flutter 数据存储--shared_preferences使用详情
- Flutter shared_preferences使用
- 理解fmt||net/http in Go
- Python -- Requests库的使用
- superagent post php,node.js,superagent_superagent抓取内容后如何传值?,node.js,superagent - phpStudy...
- 过关斩将,擒“指针”(上)
- 微服务间用户信息共享机制