Skip to content

Commit

Permalink
Build v1.6.0 and update MkDocs TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
SamErde committed Nov 15, 2024
1 parent b67bb3b commit 379aab1
Show file tree
Hide file tree
Showing 27 changed files with 289 additions and 49 deletions.
2 changes: 1 addition & 1 deletion docs/Edit-PSReadLineHistoryFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ Modified: 2024-10-10
Idea: History search with a TUI?
This may already be done by the PowerShell Run module.

## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Edit-WingetSettingsFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ Author: Sam Erde
Version: 0.1.0
Modified: 2024/10/12

## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Get-EnvironmentVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ The relevant sources for the User and Machine targets are in the registry at:
See more at \<https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables\>.
## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Get-LoadedAssembly.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ Author: Sam Erde
Version: 0.0.2
Modified: 2024/10/12

## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Get-PowerShellPortable.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ Author: Sam Erde
Version: 0.1.0
Modified: 2024/10/12
## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Get-TypeAccelerator.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ Thanks to Jeff Hicks (@JDHITSolutions) for helpful suggestions and improvements
Change Log: Removed the grid view option to allow user flexibility in how they want to output the results.
To Do: Add a way to filter/search the 'type' property.
## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Initialize-PSEnvironmentConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ To Do
Do not install already installed packages
Do not install ConsoleGuiTools in Windows PowerShell
## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Install-CommandNotFoundUtility.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ Modified: 2024-10-14

May not work with PowerShell installed from MSIX or the Microsoft Store: \<https://github.com/microsoft/PowerToys/issues/30818\>

## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Install-OhMyPosh.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink
## NOTES
## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Install-PowerShellISE.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ To Do:
- Add parameter to make the Windows Update registry change optional
- Requires admin but adding that breaks the build

## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Install-WinGet.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ To Do:
- Error handling
- Create the target folder if it does not already exist
## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/New-Credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink

## NOTES

## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/New-ScriptFromTemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,4 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink
## NOTES
## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Out-JsonFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ Author: Sam Erde
Version: 0.2.1
Modified: 2024/10/29
## RELATED LINKS
## RELATED LINKS
7 changes: 5 additions & 2 deletions docs/PSPreworkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Module Name: PSPreworkout
Module Guid: 378339de-a0df-4d44-873b-4fd32c388e06
Download Help Link: NA
Help Version: 1.5.0
Help Version: 1.6.0
Locale: en-US
---

Expand Down Expand Up @@ -56,6 +56,9 @@ Convert an object to JSON and write it to a file.
### [Set-ConsoleFont](Set-ConsoleFont.md)
Set the font for your consoles.

### [Set-DefaultTerminal](Set-DefaultTerminal.md)
Configure the default terminal for Windows

### [Set-EnvironmentVariable](Set-EnvironmentVariable.md)
Set environment variables.

Expand All @@ -71,4 +74,4 @@ Check if you are running an elevated shell with administrator or root privileges
### [Update-AllTheThings](Update-AllTheThings.md)
Update all the things!



2 changes: 1 addition & 1 deletion docs/Set-ConsoleFont.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink
## NOTES
## RELATED LINKS
## RELATED LINKS
91 changes: 91 additions & 0 deletions docs/Set-DefaultTerminal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
external help file: PSPreworkout-help.xml
Module Name: PSPreworkout
online version:
schema: 2.0.0
---

# Set-DefaultTerminal

## SYNOPSIS
Configure the default terminal for Windows

## SYNTAX

```
Set-DefaultTerminal [[-Name] <String>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```

## DESCRIPTION
This function sets that default terminal in Windows to your choice of Windows PowerShell, PowerShell, Command Prompt, or Windows Terminal (default).

## EXAMPLES

### EXAMPLE 1
```
Set-DefaultTerminal -Name 'WindowsTerminal'
```

## PARAMETERS

### -Name
The name of the application to use as the default terminal in Windows.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: WindowsTerminal
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable, and -ProgressAction.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
Author: Sam Erde
Version: 0.0.1
Modified: 2024-11-15
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Set-EnvironmentVariable.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink
## NOTES
## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Show-LoadedAssembly.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink
## NOTES
## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Show-WithoutEmptyProperty.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ subscribe to his newsletter!
https://www.linkedin.com/in/jefferyhicks/
https://twitter.com/JeffHicks
## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Test-IsElevated.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink
### Boolean
## NOTES

## RELATED LINKS
## RELATED LINKS
2 changes: 1 addition & 1 deletion docs/Update-AllTheThings.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ For more information, see about_CommonParameters (http://go.microsoft.com/fwlink
## NOTES
## RELATED LINKS
## RELATED LINKS
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ nav:
- Initialize-PSEnvironmentConfiguration: "Initialize-PSEnvironmentConfiguration.md"
- Install-CommandNotFoundUtility: "Install-CommandNotFoundUtility"
- Set-ConsoleFont: "Set-ConsoleFont.md"
- Set-DefaultTerminal: "Set-DefaultTerminal.md"
- Install-OhMyPosh: "Install-OhMyPosh.md"
- Install-PowerShellISE: "Install-PowerShellISE.md"
- Install-WinGet: "Install-WinGet.md"
- Install-CommandNotFoundUtility: "Install-CommandNoteFoundUtility"
- Edit-WinGetSettingsFile: "Edit-WinGetSettingsFile.md"
- Edit-PSReadLineHistoryFile: "Edit-PSReadLineHistoryFile.md"
- Develop:
Expand Down
19 changes: 7 additions & 12 deletions src/Artifacts/PSPreworkout.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
RootModule = 'PSPreworkout.psm1'

# Version number of this module.
ModuleVersion = '1.5.0'
ModuleVersion = '1.6.0'

# Supported PSEditions = @('Desktop', 'Core')
CompatiblePSEditions = @('Core', 'Desktop')
Expand Down Expand Up @@ -44,6 +44,7 @@
'New-ScriptFromTemplate',
'Out-JsonFile',
'Set-ConsoleFont',
'Set-DefaultTerminal',
'Set-EnvironmentVariable',
'Show-LoadedAssembly',
'Show-WithoutEmptyProperty',
Expand Down Expand Up @@ -82,25 +83,19 @@
PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'PowerShell', 'Utilities', 'Tools', 'Windows', 'Linux', 'macOS'
Tags = 'PowerShell', 'Utilities', 'Tools', 'Windows', 'Linux', 'macOS'

# A URL to the license for this module.
LicenseUri = 'https://github.com/SamErde/PSPreworkout/blob/main/LICENSE'
LicenseUri = 'https://github.com/SamErde/PSPreworkout/blob/main/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/SamErde/PSPreworkout'
ProjectUri = 'https://github.com/SamErde/PSPreworkout'

# A URL to an icon representing this module.
IconUri = 'https://raw.githubusercontent.com/SamErde/PSPreworkout/main/media/PSPreworkout-Animated-Logo-170.png'
IconUri = 'https://raw.githubusercontent.com/SamErde/PSPreworkout/main/media/PSPreworkout-Animated-Logo-170.png'

# ReleaseNotes of this module
ReleaseNotes = 'What''s New:
Improve Get-EnvironmentVariable. Return rich objects to pipeline and test more usage scenarios.
Remove requirement for .json extension in Out-JsonFile.
Accept input from pipeline in Out-JsonFile.
Ensure file is created in file system provider with Out-JsonFile.
Remove GridView parameters from Get-TypeAccelerator to give user control of output and display.
'
# ReleaseNotes = ''

# Prerelease string of this module
# Prerelease = ''
Expand Down
53 changes: 50 additions & 3 deletions src/Artifacts/PSPreworkout.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -622,10 +622,15 @@ function Initialize-PSEnvironmentConfiguration {
} else {
Write-Verbose -Message "Key already exists: $KeyPath"
}
# Set Windows Terminal as the default terminal application for Windows.
New-ItemProperty -Path 'HKCU:\Console\%%Startup' -Name 'DelegationConsole' -Value '{2EACA947-7F5F-4CFA-BA87-8F7FBEEFBE69}' -Force | Out-Null
New-ItemProperty -Path 'HKCU:\Console\%%Startup' -Name 'DelegationTerminal' -Value '{E12CFF52-A866-4C77-9A90-F570A7AA2C6B}' -Force | Out-Null

# Set Windows Terminal as the default terminal application if it is installed on this system.
if (Test-Path -Path "$env:LOCALAPPDATA\Microsoft\WindowsApps\Microsoft.WindowsTerminal_8wekyb3d8bbwe\wt.exe" -PathType Leaf) {
# Set Windows Terminal as the default terminal application for Windows.
New-ItemProperty -Path 'HKCU:\Console\%%Startup' -Name 'DelegationConsole' -Value '{2EACA947-7F5F-4CFA-BA87-8F7FBEEFBE69}' -Force | Out-Null
New-ItemProperty -Path 'HKCU:\Console\%%Startup' -Name 'DelegationTerminal' -Value '{E12CFF52-A866-4C77-9A90-F570A7AA2C6B}' -Force | Out-Null
}
#endregion Windows Terminal

} # end process block

end {
Expand Down Expand Up @@ -1087,6 +1092,48 @@ Register-ArgumentCompleter -CommandName Set-ConsoleFont -ParameterName Font -Scr
function Set-DefaultTerminal {
<#
.EXTERNALHELP PSPreworkout-help.xml
#>
[CmdletBinding(SupportsShouldProcess)]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'OK')]
param (
# The name of the application to use as the default terminal in Windows.
[Parameter(Mandatory = $false)]
[string]$Name = 'WindowsTerminal'
)
begin {
$KeyPath = 'HKCU:\Console\%%Startup'
if (-not (Test-Path -Path $keyPath)) {
New-Item -Path $KeyPath | Out-Null
} else {
Write-Verbose -Message "Key already exists: $KeyPath"
}
} # end begin block
process {
switch ($Name) {
'WindowsTerminal' {
New-ItemProperty -Path 'HKCU:\Console\%%Startup' -Name 'DelegationConsole' -Value '{2EACA947-7F5F-4CFA-BA87-8F7FBEEFBE69}' -Force | Out-Null
New-ItemProperty -Path 'HKCU:\Console\%%Startup' -Name 'DelegationTerminal' -Value '{E12CFF52-A866-4C77-9A90-F570A7AA2C6B}' -Force | Out-Null
}
default {
Write-Information -MessageData 'No terminal application was specified.' -InformationAction Continue
}
}
} # end process block
end {
Write-Information -MessageData "Default terminal set to: ${Name}." -InformationAction Continue
} # end end block
} # end function Set-DefaultTerminal
function Set-EnvironmentVariable {
<#
.EXTERNALHELP PSPreworkout-help.xml
Expand Down
Loading

0 comments on commit 379aab1

Please sign in to comment.