Skip to content

Instantly share code, notes, and snippets.

@CIPop
Last active February 7, 2024 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CIPop/ff623f861600c1e864c245910c5ec2c8 to your computer and use it in GitHub Desktop.
Save CIPop/ff623f861600c1e864c245910c5ec2c8 to your computer and use it in GitHub Desktop.
Windows Terminal Solarized Dark

From https://docs.microsoft.com/en-us/windows/terminal/tutorials/powerline-setup

Install Starship

https://starship.rs/guide/#%F0%9F%9A%80-installation Install a NerdFont.

winget install --id Starship.Starship
Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck
Install-Module PSFzf -Scope CurrentUser

Make sure fzf.exe is in the PATH.

notepad $PROFILE

Add the following to activate the command prompt as well as fix microsoft/terminal#6424

# The following may take >5 seconds to load:
Import-Module PSFzf
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r'

# Starship
Invoke-Expression (&starship init powershell)

# Ctrl+D exits the terminal
Set-PSReadlineKeyHandler -Key ctrl+d -Function ViExit

# Requires Git for Windows
New-Alias -Name "tig" "C:\Program Files\Git\usr\bin\tig.exe"

# Visual Studio 2022 Command Prompt
. "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1"

Configure Terminal

  • Use the selected nerdfont.
@CIPop
Copy link
Author

CIPop commented Jun 12, 2020

Other stuff I've configured:

"theme": "dark",
    // You can add more global application settings here.
    // To learn more about global settings, visit https://aka.ms/terminal-global-settings

    // If enabled, selections are automatically copied to your clipboard.
    "copyOnSelect": true,

    // If enabled, formatted data is also copied to your clipboard
    "copyFormatting": false,

    // A profile specifies a command to execute paired with information about how it should look and feel.
    // Each one of them will appear in the 'New Tab' dropdown,
    //   and can be invoked from the commandline with `wt.exe -p xxx`
    // To learn more about profiles, visit https://aka.ms/terminal-profile-settings
    "profiles":
    {
        "defaults":
        {
            "useAcrylic": true,
            "acrylicOpacity": 0.8

@CIPop
Copy link
Author

CIPop commented Jun 12, 2020

Dot-sourcing cmd scripts (e.g. to set up environment like Visual Studio cmd prompt):

Install-Module Pscx -Scope CurrentUser -AllowClobber
Then:

Invoke-BatchFile my.bat

(https://stackoverflow.com/questions/20077820/how-can-i-source-variables-from-a-bat-file-into-a-powershell-script)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment