Windows 11终端美化配置

阅读: 评论:0

Windows 11终端美化配置

Windows 11终端美化配置

Windows 11终端美化配置

windows11 终端配置美化

  1. 下载安装terminal
  2. 安装oh-my-posh
  3. 安装power shell core
  4. posh配置

工具软件安装

我们可以从Microsoft store上下载terminal和powershellcore

搜索terminal

搜索powershell

下载字体 : Caskaydia Cove Nerd Font Complete

下载地址:

安装oh-my-posh

下载地址:/docs/windows

  • 安装

    # 在powershell下执行下面命令进行安装
    winget install JanDeDobbeleer.OhMyPosh
    # 升级版本执行下面命令
    winget upgrade JanDeDobbeleer.OhMyPosh
    
  • 主题

    主题路径:~AppDataLocalProgramsoh-my-poshthemes

    ~AppDataLocalProgramsoh-my-poshp.json
    

terminal配置

  1. 配置powershellcore

    设置默认的启动环境

  2. 修改字体

  3. 配置文件json说明

    查看配置文件的位置

    # 查看配置文件的位置
    echo $profile
    

    第一次安装之后下面的文件是不存在的,需要创建

    创建文件,注意文件后缀

    粘贴下面的语句到配置文件中

    oh-my-posh --init --shell pwsh --config ~AppDataLocalProgramsoh-my-poshp.json | Invoke-Expression
    

    主题路径在:~AppDataLocalProgramsoh-my-poshthemes 可以个人爱好使用不用的主题

    查看主题,执行下面命令查看

    Get-ChildItem -Path "~AppDataLocalProgramsoh-my-poshthemes*" -Include '*.omp.json' | Sort-Object Name | ForEach-Object -Process {$esc = [char]27Write-Host ""Write-Host "$esc[1m$($_.BaseName)$esc[0m"Write-Host ""oh-my-posh --config $($_.FullName) --pwd $PWDWrite-Host ""
    }
    
  4. 配置oh-my-posh

  5. 美化终端图标

    Install-Module -Name Terminal-Icons -Repository PSGallery
    Import-Module -Name Terminal-Icons
    

本文发布于:2024-02-13 11:59:46,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/1715480935252751.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:终端   Windows
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23