-
Notifications
You must be signed in to change notification settings - Fork 0
/
PSProfile.ps1
26 lines (23 loc) · 1.99 KB
/
PSProfile.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Import-Module -Name Terminal-Icons
$OMPProfile = "$env:USERPROFILE\Git\TerminalConfiguration\ADJ.json"
if(!(Test-Path -Path $OMPProfile)){
Invoke-WebRequest -UseBasicParsing -Uri 'https://raw.githubusercontent.com/AlCpwnd/TerminalConfiguration/main/ADJ.json' -OutFile $OMPProfile
}
oh-my-posh init pwsh --config $OMPProfile | Invoke-Expression
function Get-GitChanges{
$Folders = Get-ChildItem -Directory
$UiColor = $Host.UI.RawUI
$WindowWidth = $Host.UI.RawUI.WindowSize.Width
foreach($Folder in $Folders){
Write-Host ""
$Spaces = " " * ($WindowWidth - ($Folder.Name.Length + 2))
Write-Host "> $($Folder.Name)$Spaces" -BackgroundColor $UiColor.ForegroundColor -ForegroundColor $UiColor.BackgroundColor
Push-Location $Folder.FullName
& git pull
Pop-Location
}
}
New-Alias -Name GGC -Value Get-GitChanges
if(Test-Path 'C:\Program Files\7-Zip\7z.exe'){
New-Alias -Name '7z' -Value 'C:\Program Files\7-Zip\7z.exe'
}