MrPig91 / PSChiaPlotter

A repo for powershell module that helps Chia Plotting
MIT License
181 stars 47 forks source link

DONE - PLEASE MERGE IT : Code for add $WindowName To Window Tittle (Custom SSD Plotter Names in WindowTitle) #27

Closed goyetus closed 3 years ago

goyetus commented 3 years ago

Adding custom $WindowName Parameter to your Script (For multiple Plotting in different SSD) Example: Plot 1 : SSD Sabrent. Plot 2: SSD 960 Evo ....

Code Uploaded to: https://github.com/MrPig91/PSChiaPlotter/pull/30/commits/f4f360b84050ec3c7fd0c817d2146a32d10de06a

Pull Request:

30

Code below :

goyetus commented 3 years ago

Edit: DONE . Added $WindowName as String Variable. PLease, Add this to your code :)

Custom Code for run it:

Start-ChiaParallelPlotting -WindowName SSD_Sabrent


function Start-ChiaParallelPlotting { [String]$WindowName, [Parameter(Mandatory)] }


$processParam = @{ FilePath = "powershell.exe" ArgumentList = "$NoExitFlag -Command Start-ChiaPlotting -TotalPlots $plotsperQueue -Buffer $Buffer -Threads $Threads -TempDirectoryPath $TempDirectoryPath -FinalDirectoryPath $FinalDirectoryPath -LogDirectoryPath $LogDirectoryPath -WindowName $WindowName -QueueName Run_$Queue" }


$host.ui.RawUI.WindowTitle = "$WindowName | $QueueName - Plot $plotNumber of $TotalPlots | Chia process Id - $($chiaProcess.id)"

goyetus commented 3 years ago

image

goyetus commented 3 years ago

https://github.com/MrPig91/PSChiaPlotter/pull/30/commits/f4f360b84050ec3c7fd0c817d2146a32d10de06a

MrPig91 commented 3 years ago

Nice, I would like it to not be mandatory since not everyone will want to change it. Possibly add a default value and take away the mandatory parameter attribute and I will merge it.

goyetus commented 3 years ago

Dont Know how to merge again (Im noob in Github).

Here you have the Changes you ask me.

Tested with WindowName Parameter and Without it Removed Mandatory Tested if is Null Or Empty or Null and Empy goyetus/PSChiaPlotter@1f0c250 goyetus/PSChiaPlotter@514ee8f

if ([string]::IsNullorEmpty($WindowName)) { $WindowName = "TEST" }

MrPig91 commented 3 years ago

I have added this with the latest merge on my branch. Thank you for the suggestion and the suggested code.

goyetus commented 3 years ago

Version 1.0.5 Updated and working perfect :)

THANKS !!!! :)