]> apps.delaporte.us Git - dotfiles.git/commitdiff
Merge.
authorEdTheDev <edward@delaporte.us>
Mon, 17 May 2021 03:52:19 +0000 (22:52 -0500)
committerEdTheDev <edward@delaporte.us>
Mon, 17 May 2021 03:52:19 +0000 (22:52 -0500)
1  2 
Microsoft.PowerShell_profile.ps1
psmodules/drivespace.psm1

index 355f90fc71206279cfb1e57c77ba9a4de924c246,d62bca4f60305027b3293a7ab015d8c0b1557b29..eed9141e1b6090431099e0951a3f18f005c1fcf2
@@@ -9,7 -9,7 +9,7 @@@
  # $env:PSModulePath = $env:PSModulePath.Replace("\\ad.uillinois.edu\techsvc\home\$($ENV:USERNAME)\Documents\PowerShell\Modules;",'')
  
  # No longer needed in PowerShell 7
- if($IsWindows -eq "") {
+ if(-Not $IsWindows) {
        # Bootstrap for older PowerShell
        Write-Host "***Bootstrapped Is Windows for older PowerShell***"
        $IsWindows = ($env:OS -eq "Windows_NT")
@@@ -26,7 -26,6 +26,7 @@@ if($IsWindows)
        $ENV:PATH+=";C:\Program Files\Microsoft VS Code\bin" # One Editor to rule them all
        $ENV:PATH+=";C:\Program Files\Git\cmd" # Version control is nice.
        $ENV:PATH+=";C:\ProgramData\chocolatey\bin" # Package management is nice.
 +      $ENV:PATH+=";C:\bin\x16emu" # Package management is nice.
        $ENV:PATH+=";C:\PENGUIN" # Flag to ensure my profile kicked in.
  }
  
@@@ -78,15 -77,18 +78,26 @@@ function Enable-PoshGit 
  New-Alias pg    Enable-PoshGit
  Write-Host "+ Type 'pg' to enable PoshGit"
  
 +function Invoke-X16Emu {
 +      param(
 +              [string]$File
 +      )
 +      x16emu.exe -bas $File -keymap en-us
 +}
 +
 +New-Alias x16   Invoke-X16Emu
  
  if((Get-Location).Path -eq $HOME){
        cd $env:src
  }
+ 
+ function Get-GitLog() {
+       git log --oneline
+ }
+ 
+ function Get-GitStatus() {
+       git status -b --short
+ }
+ 
+ New-Alias ol          Get-GitLog
+ New-Alias st          Get-GitStatus
index 59feb96d962c377038de904e7a1c58eb8f3fb4f3,361ee23d6eda38ba78afd264685f5804f85ec5a5..19fdc5e5b6648efb75c1737e5eb6547c5209f30c
@@@ -21,6 -21,22 +21,21 @@@ function Show-Drivespace() 
        }
  }
  
+ function Show-DrivespacePretty() {
+       Start-Job -Name "FileCollection" -ScriptBlock { Show-Drivespace }
+ While((Get-Job -Name "FileCollection").State -eq "Running") {
+            Write-Progress -Activity "Collecting Files..." -PercentComplete $x
+       If($x -eq 100){
+               $x = 1
+       }
+       Else{
+               $x += 1
+       }
+ }
+ Write-Progress -Activity "Collecting Files..." -Completed
+ $Files = Get-Job -Name "FileCollection" | Receive-Job
+ Get-Job -Name "FileCollection" | Remove-Job
+ }
  
  Export-ModuleMember -Function Show-Drivespace 
 -Export-ModuleMember -Function Show-DrivespacePretty
  Export-ModuleMember -Function Show-LargeFiles