2023-06-17 21:11:38 +00:00
|
|
|
# Scripts in this $PROFILE folder are added to the PATH
|
|
|
|
$env:path += ";$(Split-Path -Parent $MyInvocation.MyCommand.Path)"
|
|
|
|
|
2023-06-17 21:29:09 +00:00
|
|
|
function Test-Admin {
|
|
|
|
$current_user = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
|
|
|
|
$current_user.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
|
|
|
|
}
|
|
|
|
|
2023-06-17 21:11:38 +00:00
|
|
|
function prompt {
|
|
|
|
$prompt = "> "
|
2023-06-17 21:29:09 +00:00
|
|
|
If (Test-Admin -eq $true) {
|
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-17 21:11:38 +00:00
|
|
|
scoop bucket add extras
|
|
|
|
scoop install bleachbit
|
|
|
|
}
|