From 20e7d22da533e5b40f233592178aa3922c5d25b1 Mon Sep 17 00:00:00 2001 From: TravisTX Date: Sat, 13 Mar 2021 06:23:12 -0700 Subject: [PATCH] docs: add info for the themes page --- docs/docs/themes.md | 16 ++++++++++++++++ packages/powershell/oh-my-posh/oh-my-posh.psm1 | 10 +++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/docs/docs/themes.md b/docs/docs/themes.md index 3c95a5a0af4b..7fab15b7ca57 100644 --- a/docs/docs/themes.md +++ b/docs/docs/themes.md @@ -4,6 +4,18 @@ title: Themes sidebar_label: 🎨 Themes --- +Oh my Posh comes with many themes included out of the box. Below are some screenshots of the more common themes. +For the full updated list of themes, [view the themes][themes] in Github. If you are using PowerShell, you can +display every available theme, use the following PowerShell cmdlet. + +```powershell +Get-PoshThemes +``` + +Once you're ready to swap to a theme, follow the steps described in [🚀Installation/Replace your existing prompt][replace-you-existing-prompt]. + +Themes with `minimal` in their names do not require a Nerd Font. Read about [🆎Fonts][fonts] for more information. + ### [Agnoster] [![Agnoster](/img/themes/agnoster.png)][Agnoster] @@ -80,6 +92,10 @@ sidebar_label: 🎨 Themes [![Zash](/img/themes/zash.png)][Zash] +[themes]: https://github.com/JanDeDobbeleer/oh-my-posh/tree/main/themes +[fonts]: /docs/fonts +[replace-you-existing-prompt]: /docs/installation#3-replace-your-existing-prompt + [Agnoster]: https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/agnoster.omp.json 'Agnoster' [AgnosterPlus]: https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/agnosterplus.omp.json 'AgnosterPlus' [Aliens]: https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/aliens.omp.json 'Aliens' diff --git a/packages/powershell/oh-my-posh/oh-my-posh.psm1 b/packages/powershell/oh-my-posh/oh-my-posh.psm1 index 3ffaf46328ec..17ddcedac075 100644 --- a/packages/powershell/oh-my-posh/oh-my-posh.psm1 +++ b/packages/powershell/oh-my-posh/oh-my-posh.psm1 @@ -76,13 +76,17 @@ function Get-PoshThemes { Write-Host $logo $poshCommand = Get-PoshCommand Get-ChildItem -Path "$PSScriptRoot\themes\*" -Include '*.omp.json' | Sort-Object Name | ForEach-Object -Process { - Write-Host ("=" * $consoleWidth) - Write-Host "$esc[1m$($_.BaseName)$esc[0m" + Write-Host ("─" * $consoleWidth) + Write-Host "Theme: $esc[1m$($_.BaseName.Replace('.omp', ''))$esc[0m" Write-Host "" & $poshCommand -config $($_.FullName) -pwd $PWD Write-Host "" } - Write-Host ("=" * $consoleWidth) + Write-Host ("─" * $consoleWidth) + Write-Host "" + Write-Host "To change your theme, use the Set-PoshPrompt command. Example:" + Write-Host " Set-PoshPrompt -Theme jandedobbeleer" + Write-Host "" } function Export-PoshTheme {