是时候扔掉cmder, 换上Windows Terminal
作为一个Windows的长期用户,一直没有给款好用的终端,知道遇到了 cmder,它拯救一个习惯用Windows敲shell命令的人。
不用跟我安利macOS真香!公司上班一直用macOS,一方面确实更加习惯windows下面学习, 另一方面是上课需要Windows QQ共享桌面。
windows Terminal 1.0发布,那么是时候和 cmder 说再见了。
不过需要做一些配置和美化。
美化主题
- 安装posh-git和oh-my-posh
> Install-Module posh-git -Scope CurrentUser
> Install-Module oh-my-posh -Scope CurrentUser
- 启用默认设置
> Set-Prompt
- 设置主题:
> Set-Theme Sorin
oh-my-posh 支持十几种主题:
> Set-Theme
位于命令管道位置 1 的 cmdlet Set-Theme
请为以下参数提供值:
name: ?
警告: Theme ? not found. Available themes are:
Name Type Location
---- ---- --------
Agnoster Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\Agnoster...
AgnosterPlus Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\Agnoster...
Avit Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\Avit.psm1
Darkblood Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\Darkbloo...
Fish Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\Fish.psm1
Honukai Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\Honukai....
Paradox Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\Paradox....
Powerlevel10k-Classic Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\Powerlev...
Powerlevel10k-Lean Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\Powerlev...
PowerLine Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\PowerLin...
pure Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\pure.psm1
robbyrussell Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\robbyrus...
Sorin Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\Sorin.psm1
tehrob Defaults C:\Users\fnngj\Documents\WindowsPowerShell\Modules\oh-my-posh\2.0.412\Themes\tehrob.psm1
- 使用记事本打开PS配置文件(如无则创建该文件)
> if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force } notepad $PROFILE
随后,在打开的记事本窗口里,在文末加入下面内容,以让Powershell在启动之时应用主题,然后保存。(仅对当前用户生效)
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Sorin
设置字体
如果你设置的主题出现乱码,可以安装SarasaGothic字体库。
> scoop bucket add nerd-fonts
> scoop install SarasaGothic
或者直接到github下载:
https://github.com/be5invis/Sarasa-Gothic/releases
然后,将字体库解压 复制到 C:\Windows\Font\
目录。
Windows Terminal 设置
点击 Windows Terminal 向下箭头,选择设置,将会找打开一个配置文件。
// 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.
"fontFace": "Sarasa Term Slab SC", // 选择字体,前面安装的
"backgroundImage" : "C:/Users/fnngj/Pictures/bg.jpg", // 设置背景图片
"backgroundImageOpacity" : 0.9, // 背景图片透明度
"fontSize" : 16, // 字体大小
"foreground": "#76EE00" //字体颜色
},
//...
当然,你也可以在继续安装vim 工具,来更加符合你的 shell习惯。
是时候扔掉cmder, 换上Windows Terminal的更多相关文章
- Windows Terminal 安装及美化
windows terminal 是今年微软Build大会上推出的一款的全新终端,用来代替cmder之类的第三方终端.具有亚克力透明.多标签.Unicode支持(中文,Emoji).自带等宽字体等这些 ...
- 黑科技抢先尝(续2) - Windows terminal中Powershell Tab的极简美化指南
目录 安装python 安装git 安装powerline字体 主题定制 安装oh-my-posh 查看策略组的执行权限 使用choco 安装终端模拟器 - ConEmu 优化 PowerShell ...
- 黑科技抢先尝(续) - Windows terminal中WSL Linux 终端的极简美化指南
目录 修改默认源,为apt-get安装提速 安装python 和 python pip 安装 zsh 安装powerline-font中的特定字体 安装powerline-shell 修改~目录下的配 ...
- 终于等到你!微软正式上线 Windows Terminal 预览版
前一段时间,一直在知乎.技术社区收到技术小伙伴们的终极拷问:微软Build 大会上提到的**6月中旬**要上Windows store 的 Windows Terminal 到底啥时候可以用到呀? 有 ...
- Windows Store可以下载安装Windows Terminal (Preview)
Windows Terminal (Preview)已经可以在Windows Store下载安装. Windows Terminal (Preview)运行要求为: Windows 10 版本 183 ...
- windows linux 子系统及windows terminal的使用。
windows linux 子系统及windows terminal的使用. windows linux (wsl) 其实windows早就为我们准备好了子系统,但是我们的应用商店经常挂掉.因此都用不 ...
- Windows Terminal (Preview)治好了cmd,powershell的癌症
前言 话说n年前,我想开发一款powershell麻将游戏,但是发现命令行下无法显示麻将牌这种特殊符号. 经过研究发现,这是4字节的utf16le字符串.而powershell依赖的渲染引擎,只能渲染 ...
- 提前体验让人"回归Windows怀抱"的Windows Terminal
前言 在一年一度的微软开发者大会Build 2019登场的Windows Terminal饱受好评,大家对其也是充满了兴趣和热情,程序员的朋友圈都被微软发布的最新终端 windows Terminal ...
- Windows Terminal Preview v0.7 Release
Windows Terminal Preview v0.7 Release The following key bindings are included by default within this ...
随机推荐
- 用Navicat建MySQL数据库表,动态改变创建时间和更新时间戳
1.create_time 记录创建的时间,设默认值为:CURRENT_TIMESATMP 注意:不勾选那个[根据当前时间戳更新] 2.operator_time 更新记录的时间,勾选那个[根据当前时 ...
- Circle of Monsters(贪心)
n个怪物围成一圈,每个怪物有自己的血量和爆炸伤害. 怪物在死后会对下一个怪物造成爆炸伤害,又死了又可以爆炸...... 你每发子弹可以对怪物造成1点伤害,求杀死所有怪物的最小子弹数. 传送门 \(\c ...
- P5343 【XR-1】分块(dp矩阵加速)
\(大意是用数组a里的数字,组成一个序列,使得序列和为n的方案种数\)传送门 \(先考虑dp.\) \(但是不能直接用背包转移,因为是序列,要考虑顺序.\) \(所以,为了去重,我们令dp[i][j] ...
- springboot设置过滤器、监听器、拦截器
其实这篇文章算不上是springboot的东西,我们在spring普通项目中也是可以直接使用的 设置过滤器: 以前在普通项目中我们要在web.xml中进行filter的配置,但是只从servlet 3 ...
- Spring Cloud学习 之 Spring Cloud Hystrix(流程分析)
Spring Boot版本:2.1.4.RELEASE Spring Cloud版本:Greenwich.SR1 我们还是从流程图入手: 创建HystrixCommand或者HystrixObserv ...
- 【带着canvas去流浪(15)】threejs fundamentals翻译系列1-scene graph
示例代码托管在:http://www.github.com/dashnowords/blogs 博客园地址:<大史住在大前端>原创博文目录 华为云社区地址:[你要的前端打怪升级指南] 目录 ...
- 【Spark】如何用Spark查询IP地址?
文章目录 需求 思路 ip地址转换为Long类型的两种方法 ip地址转换数字地址的原理 第一种方法 第二种方法 步骤 一.在mysql创建数据库表 二.开发代码 需求 日常生活中,当我们打开地图时,会 ...
- redis crackit入侵事件总结
今天发现服务器有异常进程/opt/yam/yam,上网搜了搜,是由于redis未授权引起的入侵,查了些资料,这里做下总结. 1. 现象 有以下其一现象就要注意是否被入侵 crontab -l 可以看到 ...
- 可怕!CPU竟成了黑客的帮凶!
本故事根据CPU真实漏洞改编 前情回顾 还记得我吗,我是阿Q,就是那个CPU一号车间的阿Q啊.如果你忘记了我,记得看看这里回忆一下哦:完了!CPU一味求快出事儿了! 自从我们车间用上了乱序执行和分支预 ...
- HDU 3874 Necklace 区间查询的离线操作
题目: http://acm.hdu.edu.cn/showproblem.php?pid=3874 对需要查询的区间按右端点排序,然后从左到右依次加入序列中的元素,同时更新,更新的方法是,把上一次出 ...