Windows Terminal配置填坑记

2021-03-02 09:27

阅读:359

标签:sha   class   tps   terminal   启用   新建   chmod   power   str   

前言

浪哥最近一直在使用MobaXterm,感觉这款工具功能很多,而且还是经常用的功能,最近几个月一直把它当作主要的ssh工具。可是最近连Kali Linux时,频繁掉线,最快时竟然5秒钟,就开始掉线了。索性在网上找解决方案,一搜不要紧,发现还真很多人遇到同样的问题。婶可忍,叔不能忍,二营长,你他娘的Windows terminal呢。

1.0 安装Windows Terminal

其实去年微软发布预览版时,浪哥就尝鲜了。感受完后,并没有纳入后工,谁让你不是正式的呢。Windows Terminal安装很简单,到Windows 商店,搜索下载即可。启动可以到开始菜单中去找,也可以开始运行里输入wt。

2.0 安装安装 posh-git 和 oh-my-posh

oh-my-posh就是powershell上的oh-my-zsh,尽管我用的少,得装装么。

Install-Module posh-git -Scope CurrentUser 

Install-Module posh-git -Scope CurrentUser 

3.0 修改或者新增配置文件

# 如果之前没有配置文件,就新建一个 PowerShell 配置文件
if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force }

# 用记事本打开配置文件
notepad $PROFILE

#################################################################################
Import-Module posh-git 
Import-Module oh-my-posh 

配置文件里添加,post-gi和oh-my-post,使启动时可以加载这些工具。

4.0 安装更沙黑体

可以在微软商店里安装更沙黑体,安装也比较简单。

5.0 正式美化

"profiles": {
    "defaults": {
      // Put settings here that you want to apply to all profiles
      "acrylicOpacity": 0.8, //背景透明度
      "useAcrylic": true, // 启用毛玻璃
      "backgroundImage": "D:\\OneDrive\\图片\\stack.jpg", //背景图片
      "backgroundImageOpacity": 0.5, //图片透明度
      "backgroundImageStretchMode": "fill", //填充模式
      "icon": "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png", //图标
      "fontFace": "Sarasa Term SC", //字体
      "fontSize": 14, //文字大小
      "colorScheme": "Solarized Light", //主题
      "cursorColor": "#FFFFFF", //光标颜色
      "cursorShape": "bar", //光标形状
      "startingDirectory":"D://Projects//" //起始目录
    }
 }

最下边贴入,主题内容,具体主题配置。

iTerm2-Color-Schemes 这里面有各种colorScheme的JSON,找到配色的.json文件,把里面的配色复制到schemes下面,然后再修改colorScheme的值。

"schemes":[
 {
    "name": "cyberpunk",
    "black": "#000000",
    "red": "#ff7092",
    "green": "#00fbac",
    "yellow": "#fffa6a",
    "blue": "#00bfff",
    "purple": "#df95ff",
    "cyan": "#86cbfe",
    "white": "#ffffff",
    "brightBlack": "#000000",
    "brightRed": "#ff8aa4",
    "brightGreen": "#21f6bc",
    "brightYellow": "#fff787",
    "brightBlue": "#1bccfd",
    "brightPurple": "#e6aefe",
    "brightCyan": "#99d6fc",
    "brightWhite": "#ffffff",
    "background": "#332a57",
    "foreground": "#e5e5e5"
  },
  {
    "name": "Solarized Darcula",
    "black": "#25292a",
    "red": "#f24840",
    "green": "#629655",
    "yellow": "#b68800",
    "blue": "#2075c7",
    "purple": "#797fd4",
    "cyan": "#15968d",
    "white": "#d2d8d9",
    "brightBlack": "#25292a",
    "brightRed": "#f24840",
    "brightGreen": "#629655",
    "brightYellow": "#b68800",
    "brightBlue": "#2075c7",
    "brightPurple": "#797fd4",
    "brightCyan": "#15968d",
    "brightWhite": "#d2d8d9",
    "background": "#3d3f41",
    "foreground": "#d2d8d9"
  }
]

Windows Terminal配置填坑记

标签:sha   class   tps   terminal   启用   新建   chmod   power   str   

原文地址:https://www.cnblogs.com/it-zhe/p/13053084.html


评论


亲,登录后才可以留言!