PowerShell/profile.ps1

32 lines
882 B
PowerShell
Raw Normal View History

2023-06-24 02:50:33 +00:00
# Scripts in this $PROFILE\Scripts folder are added to the PATH
$env:PATH += ";$(Split-Path -Parent $MyInvocation.MyCommand.Path)\Scripts"
2023-06-17 21:29:09 +00:00
2023-06-17 21:11:38 +00:00
function prompt {
$prompt = "> "
2023-06-18 00:28:56 +00:00
If ((New-Object Security.Principal.WindowsPrincipal $(
[Security.Principal.WindowsIdentity]::GetCurrent()
2023-06-18 00:37:01 +00:00
)).IsInRole(
[Security.Principal.WindowsBuiltinRole]::Administrator
)
) {
2023-06-17 21:11:38 +00:00
$prompt = "Admin$prompt"
}
$prompt
}
2023-06-17 21:29:09 +00:00
function Install-Scoop {
2023-06-17 21:11:38 +00:00
# You can read the script before executing it here:
# https://raw.githubusercontent.com/scoopinstaller/install/master/install.ps1
Invoke-RestMethod get.scoop.sh | Invoke-Expression
# (un)install docs: https://github.com/ScoopInstaller/Install
}
2023-06-17 21:29:09 +00:00
function Install-BleachBit {
2023-06-24 02:50:33 +00:00
if (!(Get-Command "git.exe" -ErrorAction SilentlyContinue)) {
scoop install git
}
2023-06-17 21:11:38 +00:00
scoop bucket add extras
scoop install bleachbit
}