jana
asked on
Change the size of Windows Terminal and it's background color (Windows 10 Pro)
Hi Experts!
I use Windows Terminal of Windows 10 for command prompt (CMD) and PowerShell. When opening the windows in my notebook, it pretty large and I want to change it so when clicking on it, it would be in a smaller window size. Also, change the background color black to half-black or lighter-black.
I have googled on the how-to but it's enormous info. In one says I have to create a test.json file and instruct me to go to settings within the window, but that opens another file not related to the one I was instructed to create. So it got confusing for me.
Help.
I use Windows Terminal of Windows 10 for command prompt (CMD) and PowerShell. When opening the windows in my notebook, it pretty large and I want to change it so when clicking on it, it would be in a smaller window size. Also, change the background color black to half-black or lighter-black.
I have googled on the how-to but it's enormous info. In one says I have to create a test.json file and instruct me to go to settings within the window, but that opens another file not related to the one I was instructed to create. So it got confusing for me.
Help.
In Windows Terminal, just click on the down arrow and select Settings. That will open the settings.json file which controls all the settings. If you hold the Alt key while clicking Settings, it will open the defaults.json file, which you can use to look at default settings (more than what is typically present in the settings.json file, and can be useful as a reference), but you won't edit this file.. As far as what to change, the Microsoft documentation is where I would turn, as it's kept up to date with all the changes. Again, in the app, click on the down arrow, then About. That opens a small window with a link to the documentation site.
At the site, if you look under Custom Settings > Profile settings > there's a Color settings section which describes how to set the Background color. You can also look into Color Schemes, of which there are a few default ones included, namely: Campbell, Campbell Powershell, Vintage, One Half Dark, One Half Light, Tango Dark, and Tango Light. Color schemes are also set per profile.
The defaults.json file includes the color codes used in the default schemes, which may be useful as a reference.
In the global settings, you can set "initialCols" and "initialRows" to set how large you want the window.
BTW, I read there's a GUI in preview for version 1.2 for changing all the settings, so that should make things easier in a month or so (assuming it all works out).
At the site, if you look under Custom Settings > Profile settings > there's a Color settings section which describes how to set the Background color. You can also look into Color Schemes, of which there are a few default ones included, namely: Campbell, Campbell Powershell, Vintage, One Half Dark, One Half Light, Tango Dark, and Tango Light. Color schemes are also set per profile.
The defaults.json file includes the color codes used in the default schemes, which may be useful as a reference.
In the global settings, you can set "initialCols" and "initialRows" to set how large you want the window.
BTW, I read there's a GUI in preview for version 1.2 for changing all the settings, so that should make things easier in a month or so (assuming it all works out).
ASKER
Hi David!
Hi Footech,
Not really sure in values but want it smaller. But by knowing where to place the values I can tweak the size wanted.
Where exactly is that line u r saying?
Where exactly is that line u r saying?
Hi Footech,
Couldn’t find the color setting or the initcol setting (if that’s for resizing the window)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanx Footech, the sizing worked (I placed the 2 lines anywhere and sets its value then restart, worked perfect)
For color, i think I made an error becuase when I try to get in it doesn't.
How can I edit the json file without going into the windows terminal apps?
For color, i think I made an error becuase when I try to get in it doesn't.
How can I edit the json file without going into the windows terminal apps?
First open the file as described, then choose Save As and the file save dialog should show you the location of the file.
ASKER
I think I did something wrong because after saving the file, now it won't open.
I searched for the location 'C:\Users\jana\AppData\Loc al\Microso ft\Windows Apps\Micro soft.Windo wsTerminal _8wekyb3d8 bbwe' but it's empty.
Help get the apps up again please (what am I missing?)
I searched for the location 'C:\Users\jana\AppData\Loc
Help get the apps up again please (what am I missing?)
How did you search the location?
If there's no settings.json file there, it gets recreated with defaults when you launch Terminal again.
If there's no settings.json file there, it gets recreated with defaults when you launch Terminal again.
ASKER
Googles it (before I place a question I always google it - that is what I have been instructed here to do when I started).
But making a second run, found the file:
%LOCALAPPDATA%\Packages\Mi crosoft.Wi ndowsTermi nal_8wekyb 3d8bbwe\Lo calState
please tell me where to change the color to dark-grey or lither-black?
But making a second run, found the file:
%LOCALAPPDATA%\Packages\Mi
please tell me where to change the color to dark-grey or lither-black?
ASKER
Hi, found where to place the colors
- Campbell
- Campbell Powershell
- Vintage
- One Half Dark
- One Half Light
- Solarized Dark
- Solarized Light
- Tango Dark
- Tango Light
Place them under:
But havent found to use a certain color in CMD and another to Poweshell
I went to the area where it says "// Make changes here to the powershell.exe profile." but when placing the color doesn't work
help.
- Campbell
- Campbell Powershell
- Vintage
- One Half Dark
- One Half Light
- Solarized Dark
- Solarized Light
- Tango Dark
- Tango Light
Place them under:
"defaults":
But havent found to use a certain color in CMD and another to Poweshell
I went to the area where it says "// Make changes here to the powershell.exe profile." but when placing the color doesn't work
help.
ASKER
Nope, doesn't work.
Just offers
- color
- rename tab
- close
remember this is Windows Terminal
Just offers
- color
- rename tab
- close
remember this is Windows Terminal
@Philip - That is for the legacy Windows console, not Windows Terminal.
@jana - Did you read through the color settings section of the documentation site I mentioned? As I recall, the color scheme, background, and foreground settings are all under the profile settings of the .json file. Defining the colors of a color scheme is outside the profile settings. I'm not in front of a computer, so I can't give more info.
I don't know the color code for the color you want. There's quite a few color picker websites out there that will give you RGB or HTML color codes for what you pick.
@jana - Did you read through the color settings section of the documentation site I mentioned? As I recall, the color scheme, background, and foreground settings are all under the profile settings of the .json file. Defining the colors of a color scheme is outside the profile settings. I'm not in front of a computer, so I can't give more info.
I don't know the color code for the color you want. There's quite a few color picker websites out there that will give you RGB or HTML color codes for what you pick.
Misread/misinterpreted what you were after, see https://docs.microsoft.com/en-us/windows/terminal/get-started
Look at dynamic profiles then global settings.
See whether the changes you are after are contained there.
https://docs.microsoft.com/en-us/windows/terminal/get-started It is version 1.x
The dimentions of the window that you want is 24x80 lines?
Look at dynamic profiles then global settings.
See whether the changes you are after are contained there.
https://docs.microsoft.com/en-us/windows/terminal/get-started It is version 1.x
The dimentions of the window that you want is 24x80 lines?
ASKER
Thank u guys! I have the resize and color but still couldn't find color per profile.
I want CMD be one background color and the powershell another color.
How do this or where in the documentation is it?
I want CMD be one background color and the powershell another color.
How do this or where in the documentation is it?
ASKER
Ok, found the areas of the profile under:
But when I place '"colorScheme": "Color-Name"' it gives error.
So where can I place "colorScheme": "Color-Name"?
"list":
"name": "Command Prompt",
But when I place '"colorScheme": "Color-Name"' it gives error.
So where can I place "colorScheme": "Color-Name"?
You can use the global settings to set the common theme.
https://docs.microsoft.com/en-us/windows/terminal/customize-settings/global-settings#disable-dynamic-profiles
Then use the dynamic profile customization.
Without disabling the dynamic profiles.
https://docs.microsoft.com/en-us/windows/terminal/customize-settings/global-settings#disable-dynamic-profiles
Then use the dynamic profile customization.
Without disabling the dynamic profiles.
ASKER
I have the commands to change color, but I have not been able, while going thru the documentation, to know where to place the commands.
Here is my scenario:
- My Windows Terminal I can have one window and 2 profiles within that windows: CMD and Powershell.
- When I placed '"colorScheme": "One Half Dark"' under '"defaults":', both CMD and Powershell is the same color.
- I want CMD or comman promot to be one color and Powershell be another color.
The above said, where in the settings.json file I place '"colorScheme": "One Half Dark"' ?
Here is my scenario:
- My Windows Terminal I can have one window and 2 profiles within that windows: CMD and Powershell.
- When I placed '"colorScheme": "One Half Dark"' under '"defaults":', both CMD and Powershell is the same color.
- I want CMD or comman promot to be one color and Powershell be another color.
The above said, where in the settings.json file I place '"colorScheme": "One Half Dark"' ?
ASKER
Better yet, below is my settings.json, please show me where I place these commands that when I open command prompt is one color and powershell is another color:
// Windows Terminal Settings
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
// Window Size
"initialCols": 75,
"initialRows": 20,
// clipboard like command prompt
"copyOnSelect": true,
// clipboard (formatted data copied)
"copyFormatting": false,
// Profiles (each one of them will appear in the 'New Tab' dropdown)
//
"profiles":
{
"defaults":
{
// Put settings here that you want to apply to all profiles.
"colorScheme": "One Half Dark"
},
"list":
[
{
// 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": "Command Prompt",
"commandline": "cmd.exe",
"hidden": false
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
}
]
},
// Add custom color schemes to this array.
// To learn more about color schemes, visit https://aka.ms/terminal-color-schemes
"schemes": [],
// Add custom keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings
"keybindings":
[
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
// These two lines additionally bind them to Ctrl+C and Ctrl+V.
// To learn more about selection, visit https://aka.ms/terminal-selection
{ "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" },
{ "command": "paste", "keys": "ctrl+v" },
// Press Ctrl+Shift+F to open the search box
{ "command": "find", "keys": "ctrl+shift+f" },
// Press Alt+Shift+D to open a new pane.
// - "split": "auto" makes this pane open in the direction that provides the most surface area.
// - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
// To learn more about panes, visit https://aka.ms/terminal-panes
{ "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" }
]
}
You have to define color schemes and then use the colorscheme:scheme name within the section for the respective tool.
https://docs.microsoft.com/en-us/windows/terminal/customize-settings/color-schemes
https://docs.microsoft.com/en-us/windows/terminal/customize-settings/color-schemes
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Arnold & footech,
I forgot to click submit to my entry (when I closed the question) - just this when I enter the question. So consider this question closed.
I forgot to click submit to my entry (when I closed the question) - just this when I enter the question. So consider this question closed.
"profiles":
{
"defaults":
{
// Put settings here that you want to apply to all profiles.
},
"list":
[
{
// Make changes here to the powershell.exe profile.
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"name" : "Windows PowerShell",
"tabTitle": "PowerShell",
"commandline" : "powershell.exe",
"colorScheme" : "Campbell Powershell",
"fontFace" : "Consolas",
"fontSize" : 10,
"hidden" : false
Alternatively
Mstsc /h:height_pixels /w:width_pixels
H:768 w:1024 . What resolution onthe remote side do you want?