Skip to content
Discussion options

You must be logged in to vote

@tapatiohaxx In fact, this is not handled by OMP itself. Related code:

"template": " \uf1bb {{ .Env.DAYS }} days till Christmas ",

And please see this:

this theme is a bit special and needs the following in your
PowerShell profile to work correctly:

function Set-EnvVars {
$now = [DateTime]::Now
$env:DAYS = ([Datetime](“12/25/” + $now.Year) – $Now).Days
}
New-Alias -Name 'Set-PoshContext' -Value 'Set-EnvVars' -Scope Global -Force

As we can see, we need a trick to make the env DAYS reflect the amount of days until Christmas. :)

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@tapatiohaxx
Comment options

@KamilaMattos
Comment options

@lewis-yeung
Comment options

@tapatiohaxx
Comment options

@KamilaMattos
Comment options

Answer selected by JanDeDobbeleer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants