From 172f893c9fd3c1e2313a3ab050fb48d21ab632e0 Mon Sep 17 00:00:00 2001 From: MyDrift Date: Mon, 15 Jul 2024 19:16:20 +0200 Subject: [PATCH] remove trailing whitespaces THX to Mr.K :) --- functions/private/Install-WinUtilWinget.ps1 | 2 +- functions/private/Invoke-WinUtilFeatureInstall.ps1 | 2 +- functions/private/Set-WinUtilTaskbarItem.ps1 | 14 +++++++------- functions/public/Invoke-WPFFeatureInstall.ps1 | 2 +- functions/public/Invoke-WPFShortcut.ps1 | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/functions/private/Install-WinUtilWinget.ps1 b/functions/private/Install-WinUtilWinget.ps1 index 1312b0e3..881a138f 100644 --- a/functions/private/Install-WinUtilWinget.ps1 +++ b/functions/private/Install-WinUtilWinget.ps1 @@ -64,5 +64,5 @@ function Install-WinUtilWinget { throw [WingetFailedInstall]::new('Failed to install!') } } - + } diff --git a/functions/private/Invoke-WinUtilFeatureInstall.ps1 b/functions/private/Invoke-WinUtilFeatureInstall.ps1 index f4a56cb1..4b3a0f65 100644 --- a/functions/private/Invoke-WinUtilFeatureInstall.ps1 +++ b/functions/private/Invoke-WinUtilFeatureInstall.ps1 @@ -26,7 +26,7 @@ function Invoke-WinUtilFeatureInstall { } else{ - + Write-Warning "Unable to Install $feature due to unhandled exception" Write-Warning $psitem.Exception.StackTrace } diff --git a/functions/private/Set-WinUtilTaskbarItem.ps1 b/functions/private/Set-WinUtilTaskbarItem.ps1 index a4116b5c..93a8d534 100644 --- a/functions/private/Set-WinUtilTaskbarItem.ps1 +++ b/functions/private/Set-WinUtilTaskbarItem.ps1 @@ -29,7 +29,7 @@ function Set-WinUtilTaskbaritem { - Set-WinUtilTaskbaritem -overlay "None" Custom icon: - Set-WinUtilTaskbaritem -overlay "C:\path\to\icon.png" - + .PARAMETER description Description to display on the taskbar item preview Set-WinUtilTaskbaritem -description "This is a description" @@ -46,30 +46,30 @@ function Set-WinUtilTaskbaritem { <# .SYNOPSIS Converts an image file to a Bitmap object - + .PARAMETER image The path to the image file to convert - + .EXAMPLE ConvertTo-Bitmap -imageFilePath "C:\path\to\image.png" #> param ( $imageFilePath ) - + # Read the image file as a byte array $imageBytes = [System.IO.File]::ReadAllBytes($imageFilePath) - + # Convert the byte array to a Base64 string $base64String = [System.Convert]::ToBase64String($imageBytes) - + # Create a streaming image by streaming the base64 string to a bitmap streamsource $bitmap = New-Object System.Windows.Media.Imaging.BitmapImage $bitmap.BeginInit() $bitmap.StreamSource = [System.IO.MemoryStream][System.Convert]::FromBase64String($base64String) $bitmap.EndInit() $bitmap.Freeze() - + # Return the bitmap object return $bitmap } diff --git a/functions/public/Invoke-WPFFeatureInstall.ps1 b/functions/public/Invoke-WPFFeatureInstall.ps1 index e2dda9e6..57cbc38e 100644 --- a/functions/public/Invoke-WPFFeatureInstall.ps1 +++ b/functions/public/Invoke-WPFFeatureInstall.ps1 @@ -27,7 +27,7 @@ function Invoke-WPFFeatureInstall { $sync.ProcessRunning = $false $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" }) - + Write-Host "===================================" Write-Host "--- Features are Installed ---" Write-Host "--- A Reboot may be required ---" diff --git a/functions/public/Invoke-WPFShortcut.ps1 b/functions/public/Invoke-WPFShortcut.ps1 index 9c9dcc22..14fafc33 100644 --- a/functions/public/Invoke-WPFShortcut.ps1 +++ b/functions/public/Invoke-WPFShortcut.ps1 @@ -28,9 +28,9 @@ function Invoke-WPFShortcut { else{ $shell = "powershell.exe" } - + $shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://christitus.com/win | iex`"`'" - + $DestinationName = "WinUtil.lnk" }