There’s already a complete guide on getting the Poweline setup on Windows Terminal. However, for complete personalization, there are a few more steps you can take. This includes installing Powershell Core, changing the terminal color scheme and perhaps tweak the Poweline theme itself. Here’s my guide to the last stretch of personalization.
Install Powershell Core and make it the default shell
You can find the latest Powershell Core on their GitHub Releases page. Installation is straightforward of course. But, it only gets listed as an available shell in the Terminal menu and there’s no option in the UI to make it the default. Instead, you need to configure it in settings.json. Click on the Settings options in the menu to open it.
Once there, locate the entry for Powershell Core under profiles: lists. Copy the guid.
Replace the value of the defaultProfile with the copied guid.
Make the Terminal always start in a specific folder
By default the Terminal starts in the home directory for your profile. You may want it to start in your projects folder instead. This is easy to achieve. Go to the defaults inside the profiles section of the settings.json. You already used this section to set the fontFace while setting up Powerline. Add startingDirectory property with the absolute path to your desired folder.
Use a custom Windows Terminal color scheme
The default Terminal color scheme (Tango Dark) was a little too black for me. I picked Cobalt2 from a list of custom schemes I found. Find the schemes property on the settings.json. By default this would be an empty array. Paste the json for the custom color scheme to this array.
Now add a colorScheme property with the name of the custom color scheme you pasted, under the profiles: defaults section.
Tweak the Powerline
Remove the username@Computer from the start of the Powerline
If you are using Paradox or Agnoster themes, they’ll print your username and machine name at the beginning of the prompt. Which would be bit of a waste of space in most cases. Turns out this is easy to fix. Open the PowerShell profile for edit in VS Code by entering the following in the PS prompt:
> code $PROFILE
Add the following to the top of the file (other lines would already be there from you Powerline setup).
Now, lets put the space gained to good use. The Paradox theme already prints the timestamp at the end of the line. However, I find it more useful to have it in the beginning.
Here’s the easy way to do this:
In Powershell, enter $ThemeSettings. And you’ll see something similar to the following.
I’ve highlighted two properties that we are going to need.
First enter the following at the prompt to open the Paradox theme in VS Code
> code $ThemeSettings.CurrentThemeLocation
Copy the entire contents of the file. Enter the following in the prompt next:
Past what you copied before in the file and save. You now have a clone of the Paradox theme called MyParadox.
Now, you can modify the new theme to your liking. I’ve posted mine which I call the TimeParadox, at the end of this post. You can do a diff on it to see the changes I’ve made.
Show Powerline in VS Code
When you customize the Powershell, it affects everywhere a PS terminal is used. An example is the Integrated Terminal on VS Code. However, VS Code will automatically pick up the Powerline font making it look really icky.
Here’s how you fix this:
Press Ctrl+Shift+P and open the Preferences: Settings (UI).
Switch VS Code to Powershell Core
Type shell to find the Automated Shell: Windows section. Click Edit in settings.json.
Find and update the following property with the path to PS Core you installed.
Now restart VS Code. You may also need to select PS Core as the default shell when it restarts.
TimeParadox Powerline Theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also for reference, here’s my settings.json for Powershell.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters