Scott Hanselman

Now is the time to make a fresh new Windows Terminal profiles.json

October 03, 2019 Comment on this post [14] Posted in Open Source | Win10
Sponsored By

I've been talking about it for months, but in case you haven't heard, there's a new Windows Terminal in town. You can download it and start using it now from the Windows Store. It's free and open source.

At the time of this writing, Windows Terminal is around version 0.5. It's not officially released as a 1.0 so things are changing all the time.

Here's your todo - Have you installed the Windows Terminal before? Have you customize your profile.json file? If so, I want you to DELETE your profiles.json!

Your profiles.json is somewhere like C:\Users\USERNAME\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState but you can get to it from the drop down in the Windows Terminal like this:

Windows Terminal dropdown

When you hit Settings, Windows Terminal will launch whatever app is registered to handle JSON files. In my case, I'm using Visual Studio Code.

I have done a lot of customization on my profiles.json, so before I delete or "zero out" my profiles.json I will save a copy somewhere. You should to!

You can just "ctrl-a" and delete all of your profiles.json when it's open and Windows Terminal 0.5 or greater will recreate it from scratch by detecting the shells you have. Remember, a Console or Terminal isn't a Shell!

Note the new profiles.json also includes another tip! You can hold ALT- and click settings to see the default settings! This new profiles.json is simpler to read and understand because there's an inherited default.


// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation

{
"$schema": "https://aka.ms/terminal-profiles-schema",

"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",

"profiles":
[
{
// Make changes here to the powershell.exe profile
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name": "Windows PowerShell",
"commandline": "powershell.exe",
"hidden": false
},
{
// Make changes here to the cmd.exe profile
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"name": "cmd",
"commandline": "cmd.exe",
"hidden": false
},
{
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell Core",
"source": "Windows.Terminal.PowershellCore"
},
...

You'll notice there's a new $schema that gives you dropdown Intellisense so you can autocomplete properties and their values now! Check out the Windows Terminal Documentation here https://aka.ms/terminal-documentation and the complete list of things you can do in your profiles.json is here.

I've made these changes to my Profile.json.

Split panes

I've added "requestedTheme" and changed it to dark, to get a black titleBar with tabs.

requestedTheme = dark

I also wanted to test the new (not even close to done) splitscreen features, that give you a simplistic tmux style of window panes, without any other software.

// Add any keybinding overrides to this array.
// To unbind a default keybinding, set the command to "unbound"
"keybindings": [
{ "command": "closeWindow", "keys": ["alt+f4"] },
{ "command": "splitHorizontal", "keys": ["ctrl+-"]},
{ "command": "splitVertical", "keys": ["ctrl+\\"]}
]

Then I added an Ubuntu specific color scheme, named UbuntuLegit.

// Add custom color schemes to this array
"schemes": [
{
"background" : "#2C001E",
"black" : "#4E9A06",
"blue" : "#3465A4",
"brightBlack" : "#555753",
"brightBlue" : "#729FCF",
"brightCyan" : "#34E2E2",
"brightGreen" : "#8AE234",
"brightPurple" : "#AD7FA8",
"brightRed" : "#EF2929",
"brightWhite" : "#EEEEEE",
"brightYellow" : "#FCE94F",
"cyan" : "#06989A",
"foreground" : "#EEEEEE",
"green" : "#300A24",
"name" : "UbuntuLegit",
"purple" : "#75507B",
"red" : "#CC0000",
"white" : "#D3D7CF",
"yellow" : "#C4A000"
}
],

And finally, I added a custom command prompt that runs Mono's x86 developer prompt.

{
"guid": "{b463ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Mono",
"fontFace": "DelugiaCode NF",
"fontSize": 16,
"commandline": "C://Windows//SysWOW64//cmd.exe /k \"C://Program Files (x86)//Mono//bin//setmonopath.bat\"",
"icon": "c://Users//scott//Dropbox//mono.png"
}

Note I'm using forward slashes an double escaping them, as well as backslash escaping quotes.

Save your profiles.json away somewhere, make sure your Terminal is updated, then delete it or empty it and you'll likely get some new "free" shells that the Terminal will detect, then you can copy in just the few customizations you want.


Sponsor: Like C#? We do too! That’s why we've developed a fast, smart, cross-platform .NET IDE which gives you even more coding power. Clever code analysis, rich code completion, instant search and navigation, an advanced debugger... With JetBrains Rider, everything you need is at your fingertips. Code C# at the speed of thought on Linux, Mac, or Windows. Try JetBrains Rider today!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
October 06, 2019 9:14
Looks good. Found issue that if you install this and wsl in one order, the wsl containers show up in the drop down, but if you do it in the opposite order, they don’t. Unfortunately, I cannot remember which order I did them in that it worked correctly.
October 06, 2019 11:19
I'm thinking about adding Night Commander to Windows Terminal.
October 06, 2019 14:45
Hello Scott! I am struggling to get powerlines working on the new terminal and I noticed from the screenshots that yours are being nicely rendered. What font are you using?
October 06, 2019 19:34
@Raphael - Scott updated this blog post (bottom of post). A reader was kind enough to patch the cascadia font with powerline symbols.
JH
October 06, 2019 21:17
I really hope that they don’t bring some new guids into our lives. That just reminds me of the .sln file. Why can’t the keys for the profiles just be the name and set the default by referencing the name? I guess I should file an issue.
October 07, 2019 0:51
Scott, you should submit a PR to the Windows Terminal project to officially add UbuntuLegit as a built-in color scheme. Then I wouldn't have to add this color scheme on all my machines. :-) They do take them. I added One Half Dark/Light months ago via a PR.
October 07, 2019 18:26
Thanks (as always!)

I've just had a quick play with this and I really like the panes experience. I've found that using alt+f4 bound to closePane feels more natural as it closes the active pane first, then the tab if there is only one pane left.

I've been using Windows Terminal exclusively for a while now and am loving it - I know it'll be a personal taste thing, but a *bit* (0.8) of acrylic looks nice in a profile. ("acrylicOpacity": 0.8, "useAcrylic": true)
October 08, 2019 13:16
Is it possible to use the split-screen features and also set the background image independently for each of the sub-screens? I use reaction gifs, as written here https://www.hanselman.com/blog/AddingReactionGifsForYourBuildSystemAndTheWindowsTerminal.aspx , but all sub-screen that uses the same profile will change background.
October 08, 2019 18:48
When can I hit control-enter to go full screen?

October 08, 2019 20:35
Scott,

Can you get these done?

- Add new project to VS solution sub-folder in project explorer should add the project to the sub-folder on disk.
- Add new project sub-folder in solution explorer should add a new sub-folder on disk
- Rename project sub-folder in solution explorer should rename the folder on disk

The first one cost me 1 hour today as I added the new project to a sub-folder in VS last week and today discovered it lamely added it to the project root directory. Adding a new project to an existing solution should require hand-editing csproj files.

A few of the fixes needed:
- Hand editing the csproj file to fix up 4 different sets of paths to packages
- Hand editing csproj file to fix many other paths
- Removing the project from the solution, moving the project and its files to the sub-directory and adding it back

Visual Studio 2017 not .NET core - It's an solution we started late last year and could not use .NET core per architect's guidance. Upgrading to VS 2019 is mid-next year due to the cost of retesting and redeploying out solution to several thousand computers.

The above have cost me several hours every year of lost productivity.

Simply stated, when possible, Visual Studio should make parallel changes to the file system for solution explorer changes.

Needing to remember a horde of gotcha tidbits - A,B,C,D,...,X,Y,Z should not be required to use Visual Studio, C# and a cloud hosted SQL Server. No more death by a thousand cuts.
October 09, 2019 18:36
Creating Panes via Shortcuts is nice, but your examples misses closing navigation and resizing of the panes.

"keybindings": [
{ "command": "closeWindow", "keys": ["alt+f4"] },
{ "command": "closePane", "keys": ["ctrl+f4"] },
{ "command": "splitHorizontal", "keys": ["ctrl+-"]},
{ "command": "splitVertical", "keys": ["ctrl+\\"]},
{ "command": "moveFocusLeft", "keys": ["ctrl+shift+left"]},
{ "command": "moveFocusRight", "keys": ["ctrl+shift+right"]},
{ "command": "moveFocusUp", "keys": ["ctrl+shift+up"]},
{ "command": "moveFocusDown", "keys": ["ctrl+shift+down"]},
{ "command": "resizePaneLeft", "keys": ["ctrl+shift+alt+left"]},
{ "command": "resizePaneRight", "keys": ["ctrl+shift+alt+right"]},
{ "command": "resizePaneUp", "keys": ["ctrl+shift+alt+up"]},
{ "command": "resizePaneDown", "keys": ["ctrl+shift+alt+down"]}
]
October 09, 2019 20:54
Great, thank you for sharing this post.
October 10, 2019 17:02
Great post! i found it really a helful.
October 11, 2019 8:14
Windows Terminal is a really, efficient, powerful, fast and productive terminal application for users of command-line tools
I Will share my experience after playing with it over this weekend

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.