Forked from shanselman/Microsoft.PowerShell_profile.ps1
Last active
October 8, 2021 13:57
-
-
Save royashbrook/e6fac98d9d956d6fc96852a1bc1dfe8a to your computer and use it in GitHub Desktop.
PowerShell Profile
This file contains 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
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