安装 Fluent Terminal 和 Oh-My-Posh
🔨

安装 Fluent Terminal 和 Oh-My-Posh

Created
Jan 1, 2022 04:03 AM
Tags
windows
Property
  1. GitHub下载Fluent Terminal安装包, 下载地址 👉 Releases · felixse/FluentTerminal
  1. 解压后,运行Install.ps1,需要开启开发人员模式
  1. 使用管理员模式启动Fluent Terminal ,执行以下命令
# 绕过 powershell 执行策略,使其可以顺利执行脚本 Set-ExecutionPolicy Bypass # posh-git将git信息添加到提示中 Install-Module posh-git -Scope CurrentUser # oh-my-posh提供主题 Install-Module oh-my-posh -Scope CurrentUser
  1. 添加配置文件
# 如果之前没有配置文件,就新建一个 Powershell 配置文件 if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force } # 打开配置文件,优先使用 vscode ,其次会使用记事本打开 notepad $PROFILE # 添加配置 Import-Module posh-git Import-Module oh-my-posh Set-PoshPrompt -Theme Paradox Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
  1. 添加注册表
FluentTerminal/Explorer Context Menu Integration at master · felixse/FluentTerminal (github.com)
FluentTerminal.ico
# 添加右键快捷菜单 copy /y FluentTerminal.ico "%LOCALAPPDATA%\Microsoft\WindowsApps" reg add "HKCU\Software\Classes\Directory\shell\Open Fluent Terminal here\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f reg add "HKCU\Software\Classes\Directory\shell\Open Fluent Terminal here" /v icon /t REG_SZ /d "%LOCALAPPDATA%\Microsoft\WindowsApps\FluentTerminal.ico" /f reg add "HKCU\Software\Classes\Directory\Background\shell\Open Fluent Terminal here\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f reg add "HKCU\Software\Classes\Directory\Background\shell\Open Fluent Terminal here" /v icon /t REG_SZ /d "%LOCALAPPDATA%\Microsoft\WindowsApps\FluentTerminal.ico" /f reg add "HKCU\Software\Classes\Drive\shell\Open Fluent Terminal here\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f reg add "HKCU\Software\Classes\Drive\shell\Open Fluent Terminal here" /v icon /t REG_SZ /d "%LOCALAPPDATA%\Microsoft\WindowsApps\FluentTerminal.ico" /f reg add "HKCU\Software\Classes\LibraryFolder\Background\shell\Open Fluent Terminal here\command" /d "\"%LOCALAPPDATA%\Microsoft\WindowsApps\flute.exe\" new \"%%V\"" /f reg add "HKCU\Software\Classes\LibraryFolder\Background\shell\Open Fluent Terminal here" /v icon /t REG_SZ /d "%LOCALAPPDATA%\Microsoft\WindowsApps\FluentTerminal.ico" /f # 删除右键快捷菜单 reg delete "HKCU\Software\Classes\Directory\shell\Open Fluent Terminal here" /f reg delete "HKCU\Software\Classes\Directory\Background\shell\Open Fluent Terminal here" /f reg delete "HKCU\Software\Classes\LibraryFolder\Background\shell\Open Fluent Terminal here" /f