Skip to content

Instantly share code, notes, and snippets.

@schindld
schindld / .myposhtheme.omp.json
Last active October 20, 2023 17:09
Customized theme for oh-my-posh
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"console_title_template": "{{if .Root}} \u26a1 {{end}}{{.UserName}} \u2794 📁{{.Folder}}",
"final_space": true,
"patch_pwsh_bleed": true,
"version": 2,
"blocks": [
{
"type": "prompt",
"alignment": "left",
@schindld
schindld / profile.ps1
Last active August 23, 2024 12:18
Powershell profile (init script)
$sri_dev = '10.5.0.30';
$sri_stage = '10.1.0.189';
$sri_prod = '10.1.0.188';
oh-my-posh init pwsh --config "$HOME\.myposhtheme.omp.json" | Invoke-Expression;
$null = Register-EngineEvent -SourceIdentifier 'Powershell.OnIdle' -MaxTriggerCount 1 -Action {
# A simple implementation of refreshenv
function Global:Update-SessionEnvironment {
# Call a powershell process to act as a wrapper to capture the output: