Skip to content

jacobjmarks/pwsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Windows PowerShell Core Bootstrapper

Preview

A script to install and configure a Windows PowerShell Core environment powered by Oh My Posh, for use in Windows Terminal.

Designed to be largely non-opinionated, non-clobbering, and repeatable.

Utilises the Windows Package Manager over other third-party options for lightweight and as-native application installation.

Usage

The script can be invoked remotely with defaults via the following command:

irm "https://raw.githubusercontent.com/jacobjmarks/pwsh/main/bootstrap.ps1" | iex

If you'd like to stabilise the script against changes, replace main with your commit hash of choice.

Advanced Usage

For advanced usage scenarios and customisation, download the script and utilise the available CLI arguments:

irm "https://raw.githubusercontent.com/jacobjmarks/pwsh/main/bootstrap.ps1" -OutFile bootstrap.ps1
Get-Help -Detailed .\bootstrap.ps1

Available Parameters

Parameter Type Description Default
-Theme string Oh My Posh theme to configure for use "paradox"
-NerdFont string Nerd Font to install. "Hack"
-NoFonts switch Skip installation of fonts $false

Windows Terminal Configuration

Once the bootstrapping script has been run, the following Windows Terminal configuration is recommended.

At a minimum, you should configure your Terminal to utilise a Nerd Font, presumably the one that was installed via the bootstrapping script.

Setting Value
Startup > Default profile PowerShell
Startup > Default terminal application Windows Terminal
Appearance > Application Theme Dark
Appearance > Use acrylic material in the tab row true
Rendering > Use the new text renderer ("AtlasEngine") true
Profiles: Defaults > Additional settings: Appearance > Text: Color scheme One Half Dark
Profiles: Defaults > Additional settings: Appearance > Text: Font face Hack Nerd Font
Profiles: Defaults > Additional settings: Appearance > Transparency: Background opacity 75%
Profiles: Defaults > Additional settings: Appearance > Transparency: Enable acrylic material true

Contents

The script installs/updates the following components (unless otherwise stated):

Applications

Modules / Tooling

  • gsudo
    A sudo equivalent for Windows.

  • Oh My Posh (via Microsoft Store)
    A prompt theme engine for any shell.

  • Terminal-Icons
    Shows file and folder icons in the terminal.

  • posh-git
    Provides Git status information to the prompt.

  • z
    Directory jumper.

Fonts

Inspiration

Next Steps

Optional Components

While not installed via the bootstrapping script, you may find some additional useful components below.

7-Zip is a file archiver with a high compression ratio.

winget install -e --id 7zip.7zip

The Azure command-line interface (Azure CLI) is a set of commands used to create and manage Azure resources.

winget install -e --id Microsoft.AzureCLI

The Azure Functions Core Tools provide a local development experience for creating, developing, testing, running, and debugging Azure Functions.

winget install -e --id Microsoft.AzureFunctionsCoreTools

The Microsoft/npm/Google recommended Node.js version manager for Windows.

winget install -e --id CoreyButler.NVMforWindows