winwal icon indicating copy to clipboard operation
winwal copied to clipboard

Oh-My-Posh theme is not persisting on my terminal

Open mobi35 opened this issue 2 years ago • 2 comments

Hi, I'm having an issue persisting the theme on my terminal

I have to manually do something like this on my profile #Invoke-Expression -Command 'Update-WalTheme *>&1 | Out-Null' to make it work, but there's 2 seconds delay which is a hassle. Should I do something to persist it?

mobi35 avatar Sep 13 '23 07:09 mobi35

The way winwal.psm1 is coded changes the theme to agnoster after running Update-WalTheme. What we need is either the knowledge on what to do to make our own themes take in the colors generated, or an update to the script to apply the colors to the current theme.

I was just about to open an issue to ask the same thing.

In the meantime, you can comment out lines 156-158 in winwal.psm1 (should be these lines:

 # New oh-my-posh
 if ((Get-Command oh-my-posh -ErrorAction SilentlyContinue) -and (Test-Path "${HOME}/.cache/wal/posh-wal-agnoster.omp.json"))
{
    oh-my-posh init pwsh --config "${HOME}/.cache/wal/posh-wal-agnoster.omp.json" | Invoke-Expression
}

)

This will keep your current posh theme set, however it will not update the colors of the theme.

soarn avatar Sep 16 '23 19:09 soarn

Okay, after looking at it a little bit more, inside of the winwal/templates folder is where there are defaults for the agnoster and clean themes, all you need to do is look at them, see what colors they use, and make a template for your own theme using those as guides. image

soarn avatar Sep 16 '23 19:09 soarn