感觉 WindowsPower Shell真的是丑爆了,尤其是字体,偶然间接触到FluentTerminal 这个项目

FluentTerminal git项目地址

安装方式一

win10 应用商店安装

安装方式二

手动安装。在git项目的 Releases 下载最新的安装包。

安装

右键 Install.ps1Power Shell打开即可,按照步骤安装

美化步骤

  1. 管理员方式启动 windowsPower Shell,执行下命令

    Set-ExecutionPolicy Bypass
  2. Fluent Terminal运行下列命令:

    Install-Module DirColors -Scope CurrentUser
    Install-Module posh-git -Scope CurrentUser
    Install-Module oh-my-posh -Scope CurrentUser
  3. Fluent Terminal下查看默认配置文件路径

    $profile
  4. 进入\WindowsPowerShell下编辑Microsoft.PowerShell_profile.ps1

  5. 写入如下代码并保存:

    Import-Module posh-git
    Import-Module oh-my-posh
    Import-Module DirColors
    Set-PoshPrompt <主题名称>

    例如:

    Import-Module posh-git
    Import-Module oh-my-posh
    Import-Module DirColors
    Set-PoshPrompt Avit

添加右键

Install.bat

reg add "HKCU\Software\Classes\Directory\shell\在Fluent Terminal打开\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%1\"" /f
reg add "HKCU\Software\Classes\Directory\Background\shell\在Fluent Terminal打开\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f
reg add "HKCU\Software\Classes\LibraryFolder\Background\shell\在Fluent Terminal打开\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f

Uninstall.bat

reg delete "HKCU\Software\Classes\Directory\shell\在Fluent Terminal打开" /f
reg delete "HKCU\Software\Classes\Directory\Background\shell\在Fluent Terminal打开" /f
reg delete "HKCU\Software\Classes\LibraryFolder\Background\shell\在Fluent Terminal打开" /f