Last active
September 10, 2025 18:39
-
-
Save ThanosPapathanasiou/1135f308ce02b44e805cbd5fd73488e1 to your computer and use it in GitHub Desktop.
Microsoft.PowerShell_profile.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 gitcloc { cloc --vcs=git } | |
| 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 browsing/media/office programs | |
| , "JanDeDobbeleer.OhMyPosh" | |
| , "Brave.Brave" | |
| , "VideoLAN.VLC" | |
| , "TheDocumentFoundation.LibreOffice" | |
| # , "Microsoft.PowerToys" | |
| # , "CPUID.HWMonitor" | |
| # , "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 | |
| , "Discord.Discord" | |
| , "Valve.Steam" | |
| # , "EpicGames.EpicGamesLauncher" | |
| # , "Blizzard.BattleNet" # This might fail as it requires to set a location for some reason. Try this instead: winget install Blizzard.BattleNet -e --location "C:\Program Files (x86)\Battle.net" --silent --accept-package-agreements --accept-source-agreements | |
| # , "OBSProject.OBSStudio" | |
| ) | |
| 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