首页 > 其他分享 >Terminal Seting

Terminal Seting

时间:2023-01-02 17:01:53浏览次数:50  
标签:themes posh oh -- Terminal theme my Seting

PowerShell 配置文件脚本,每次启动之后自动加载

notepad $PROFILE

在配置文件里添加以下行:

oh-my-posh init pwsh --config '$env:POSH_THEMES_PATH\jandedobbeleer.omp.json' | Invoke-Expression

重新加载配置文件以使更改生效

. $PROFILE

查看所有 themes:

Get-PoshThemes

设置选中的 themes:

oh-my-posh init pwsh --config 'C:\Users\Lenovo\AppData\Local\Programs\oh-my-posh\themes\jandedobbeleer.omp.json' | Invoke-Expression

设置随机 themes:

$theme = Get-ChildItem $env:UserProfile\\AppData\\Local\\Programs\\oh-my-posh\\themes\\ | Get-Random
echo "hello! today's lucky theme is: $theme :)"
oh-my-posh --init --shell pwsh --config $theme.FullName | Invoke-Expression

参考链接:

1、Themes - Oh My Posh

2、PowerShell - Oh My Posh

3、ubuntu - oh-my-posh

标签:themes,posh,oh,--,Terminal,theme,my,Seting
From: https://www.cnblogs.com/cloudhan/p/17020159.html

相关文章