Terminal: Add Optional Cursor Properties to Color Schemes

Created on 14 May 2019  路  6Comments  路  Source: microsoft/terminal

There are several fields assigned against profiles that feel like they would be better placed in schemes (or at least duplicated to schemes):

  • cursorColor
  • cursorShape
  • fontFace
  • fontSize

There are two options for these properties that could be utilised:

  1. Remove them from the profile and add them to schemes, updating the current schemes with default values.
  2. Leave them in the profile and have them act as an override when present, similar to what background is doing currently.

Additionally, it may be worth actually removing the default background value, to allow the theme background to actually work by default.

Area-Settings Help Wanted Issue-Feature Product-Terminal

Most helpful comment

I am actually using mbadolato/iTerm2-Color-Schemes and that's where I noticed this problem.
For example, this is the Github theme:
image
Of course I can change the cursor color for the profile, but what if I then want to use this same theme for a different profile? I'm showing Powershell 7 here, if I want this for Powershell 6 or WSL I need to update the cursor color there as well. If when I want to change theme again I need to update all those places again...

I like the idea to be able to override settings in a Profile but I'd also like to be able to have these as Scheme defaults

All 6 comments

Actually, the schemes are intentionally colors-only. They're supposed to be a collection of terminal color palettes that could easily be changed. See mbadolato/iTerm2-Color-Schemes for a comprehensive list of terminal color scheme examples.

I could see the cursor color and shape being added to the scheme _optionally_, as most themes wouldn't have any sort of preference for the cursor properties. I'd definitely want to keep the ability for the profile to override these values however.

I believe the only default profile with a background set is Powershell at the moment, and that is a totally optional property, so if you don't like it, it can always be removed :)

Makes sense. In which case cursorColor makes sense to add. cursorShape could go either way, since its visual, but not strictly colouring.

mbadolato/iTerm2-Color-Schemes has many schemes which include cursorColor and some others (e.g. selectionColor), but depending on whether or not the target format (e.g. .itermcolors) supports it.

For example the AdventureTime scheme in X11 format has several extra colours but in MobaXTerm format has fewer extra colours.

As a related aside, I've raised mbadolato/iTerm2-Color-Schemes#191 to add all the schemes in that repo in the JSON format for the new Terminal. If cursorColor and others were added, it would be trivial but useful to further update the repo with the extra supported colours.

I am actually using mbadolato/iTerm2-Color-Schemes and that's where I noticed this problem.
For example, this is the Github theme:
image
Of course I can change the cursor color for the profile, but what if I then want to use this same theme for a different profile? I'm showing Powershell 7 here, if I want this for Powershell 6 or WSL I need to update the cursor color there as well. If when I want to change theme again I need to update all those places again...

I like the idea to be able to override settings in a Profile but I'd also like to be able to have these as Scheme defaults

@carlocardella for the record, your situation will probably be helped in the immediate future by #3369. This is still a good and reasonable request for the future though :)

I landed here searching for how to customize cursor color in Windows Terminal _relative_ to the color scheme that has been applied. I wanted to use a light color scheme so applied "Tomorrow" color scheme, available here. Default cursor color in Windows Terminal being white (#ffffff), the cursor immediately went missing on applying the color scheme.

It would have really helped to be able to override cursor color in color scheme as mentioned by @carlocardella .

Since that is not available, out of curiosity, I wanted to check if setting value of the cursorColor property in relevant profile to black would pick up the actual value defined for black in applicable color scheme. But saving the profile caused Windows Terminal to throw follow error, The line number and column in the error message is right where black was defined in the applicable color scheme.
image

Apparently this doesn't seem to be supported. Also from the thread, it appears that color scheme is applied _after_ the console is created using the profile properties? Hence the need to have absolute hex definitions for colors in the profile properties? Could that sequence be instead changed to load and apply the color scheme _before_ profile is loaded and applied, so that the _color names_ as defined in the color scheme could be mentioned in profile instead of absolute values, making color scheme the true reference point? Such relative _color names_ used in profile would be resolved using the loaded color scheme which defines them. This obviously would be completely opposite to the request of being able to define cursorColor overrides in the color scheme, given the sequence in which color scheme is / would be applied. Thoughts?

Was this page helpful?
0 / 5 - 0 ratings