Skip to content

Instantly share code, notes, and snippets.

@ThanosPapathanasiou
Last active July 20, 2025 18:14
Show Gist options
  • Save ThanosPapathanasiou/1135f308ce02b44e805cbd5fd73488e1 to your computer and use it in GitHub Desktop.
Save ThanosPapathanasiou/1135f308ce02b44e805cbd5fd73488e1 to your computer and use it in GitHub Desktop.
Microsoft.PowerShell_profile.ps1
if (-not (Get-Command oh-my-posh -ErrorAction SilentlyContinue)) {
winget install --id JanDeDobbeleer.OhMyPosh --silent --accept-package-agreements --accept-source-agreements
}
$posh_theme="kali"
oh-my-posh --init --shell pwsh --config $env:POSH_THEMES_PATH\$posh_theme.omp.json | Invoke-Expression
function .. { Set-Location .. }
function ... { Set-Location .. ; Set-Location .. }
function refresh { pwsh }
function profile { code $PROFILE }
function save-profile {
$gist = gh gist list | Select-String "Microsoft.PowerShell_profile.ps1"
$gistId = if ($gist) { $gist.Line.Split()[0] } else { $null }
if ($gistId) { gh gist edit $gistId $PROFILE }
else { gh gist create --public $PROFILE }
}
function install-tools {
$packages = @(
# general user experience
, "MartiCliment.UniGetUI"
, "JanDeDobbeleer.OhMyPosh"
, "Microsoft.PowerToys"
, "CPUID.HWMonitor"
# browsing/media/office programs
, "Mozilla.Firefox"
, "VideoLAN.VLC"
, "TheDocumentFoundation.LibreOffice"
# , "Spotify.Spotify"
# , "Zoom.Zoom"
# , "WhatsApp.WhatsApp"
# , "Microsoft.Teams"
# programming
, "Git.Git"
, "GitHub.GitHubDesktop"
, "GitHub.cli"
, "Microsoft.Edit"
, "Notepad++.Notepad++"
, "Microsoft.VisualStudioCode"
, "JetBrains.Rider"
, "Microsoft.WindowsTerminal"
, "Microsoft.PowerShell"
, "Microsoft.DotNet.SDK.8"
, "Microsoft.DotNet.SDK.Preview"
, "OpenJS.NodeJS.LTS"
, "Docker.DockerDesktop"
# gaming / streaming
, "OBSProject.OBSStudio"
, "Valve.Steam"
, "EpicGames.EpicGamesLauncher"
# , "Blizzard.BattleNet"
# Battlenet requires you to set the location for some reason.
# winget install Blizzard.BattleNet -e --location "C:\Program Files (x86)\Battle.net" --silent --accept-package-agreements --accept-source-agreements
)
foreach ($package in $packages) {
Write-Host "Installing $package..."
winget install --exact --id $package --silent --accept-package-agreements --accept-source-agreements --source winget
Write-Host ""
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment