windows terminal 个人配置

之前参考一些网站配置了个人感觉比较好看的windows terminal,特地记录下来方便下次配置

一、Microsoft Store下载软件

powershell

非电脑原来自带的,感觉更新点。
在这里插入图片描述

windows terminal

在这里插入图片描述

二、安装choco

一个管理包的工具,方便更新cmake、gcc、字体等不会自动更新的软件
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://community.chocolatey.org/install.ps1'))

三、设置powershell管理员权限

安装gsudo

choco install gsudo

修改Windows terminal设置

修改命令行如下
在这里插入图片描述
-nologo可以使得在启动时直接显示输入栏,不显示其他信息

四、安装oh-my-posh

可选择powershell主题
输入

Install-Module posh-git
Install-Module oh-my-posh

输入 code $PROFILE,粘贴

#------------------------------- Import Modules BEGIN -------------------------------
# 设置 PowerShell 主题
Set-PoshPrompt -Theme Paradox
#------------------------------- Import Modules END   -------------------------------

# 设置 Tab 键补全
Set-PSReadlineKeyHandler -Key Tab -Function Complete

#requires -Version 2.0 -Modules PowerShellGet
function Remove-OldModules
{
  <#
<#
    Author: Luke Murray (Luke.Geek.NZ)
    Version: 0.1
    Purpose: Basic function to remove old PowerShell modules which are installed
#>

  #>
  $Latest = Get-InstalledModule 
  foreach ($module in $Latest) { 
    
    Write-Verbose -Message "Uninstalling old versions of $($module.Name) [latest is $( $module.Version)]" -Verbose
    Get-InstalledModule -Name $module.Name -AllVersions | Where-Object {$_.Version -ne $module.Version} | Uninstall-Module -Verbose 
  }
}

五、修改Windows terminal设置

默认启动powershell

在这里插入图片描述

修改终端配色

终端主题查看
在这里插入图片描述

修改终端字体

GitHub下载地址
在这里插入图片描述
记得保存

最终效果

在这里插入图片描述

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值