Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save royashbrook/e6fac98d9d956d6fc96852a1bc1dfe8a to your computer and use it in GitHub Desktop.
Save royashbrook/e6fac98d9d956d6fc96852a1bc1dfe8a to your computer and use it in GitHub Desktop.
PowerShell Profile
function OhMyPoshStuff{
Import-Module oh-my-posh
Import-Module -Name Terminal-Icons
function Get-ThemeList{
$themeurl = "https://github.com/JanDeDobbeleer/oh-my-posh/tree/main/themes"
$ProgressPreference = 'SilentlyContinue'
$links = (iwr $themeurl).links
$ProgressPreference = 'Continue'
$themes=($links | where title -like *omp.json).title -Replace ".omp.json",""
$themes | ?{$_ -notlike "* *"}
}
function Set-RandomPoshPrompt{
#global just so i can look at the list if i want to
if (!$global:themes){
$global:themes = Get-ThemeList
}
$randomtheme = Get-Random $themes
Set-PoshPrompt $randomtheme
"Random them chosen: $randomtheme"
}
Set-RandomPoshPrompt
}
#helper/alias
function psup {
& iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
}
function push{
iex (irm https://raw.githubusercontent.com/royashbrook/PSAgentDeploy/main/deploy.ps1)
}
OhMyPoshStuff
"Helper Commands: psup,push"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment