Add Optional Cursor Properties to Color Schemes #1049

Open
opened 2026-01-30 22:15:07 +00:00 by claunia · 6 comments
Owner

Originally created by @ObsidianPhoenix on GitHub (May 14, 2019).

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.

Originally created by @ObsidianPhoenix on GitHub (May 14, 2019). 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.
claunia added the Issue-FeatureHelp WantedArea-SettingsProduct-Terminal labels 2026-01-30 22:15:07 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 14, 2019):

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 :)

@zadjii-msft commented on GitHub (May 14, 2019): 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](https://github.com/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 :)
Author
Owner

@ObsidianPhoenix commented on GitHub (May 14, 2019):

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

@ObsidianPhoenix commented on GitHub (May 14, 2019): Makes sense. In which case `cursorColor` makes sense to add. `cursorShape` could go either way, since its visual, but not strictly colouring.
Author
Owner

@beforan commented on GitHub (Jun 23, 2019):

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.

@beforan commented on GitHub (Jun 23, 2019): [mbadolato/iTerm2-Color-Schemes](https://github.com/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](https://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/xrdb/AdventureTime.xrdb) has several extra colours but in [MobaXTerm format](https://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/mobaxterm/AdventureTime.ini) 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.
Author
Owner

@carlocardella commented on GitHub (Nov 6, 2019):

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 commented on GitHub (Nov 6, 2019): I am actually using [mbadolato/iTerm2-Color-Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes) and that's where I noticed this problem. For example, this is the Github theme: ![image](https://user-images.githubusercontent.com/5784415/68315066-1363d880-006c-11ea-8527-a1fb967ce620.png) 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
Author
Owner

@zadjii-msft commented on GitHub (Nov 6, 2019):

@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 :)

@zadjii-msft commented on GitHub (Nov 6, 2019): @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 :)
Author
Owner

@WinCPP commented on GitHub (Jan 11, 2020):

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?

@WinCPP commented on GitHub (Jan 11, 2020): 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](https://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/windowsterminal/Tomorrow.json). 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](https://user-images.githubusercontent.com/8945458/72207685-5b1a3c80-34c1-11ea-8e79-986c89ebf8fb.png) 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?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1049