Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Optional Cursor Properties to Color Schemes #764

Open
ObsidianPhoenix opened this issue May 14, 2019 · 6 comments
Open

Add Optional Cursor Properties to Color Schemes #764

ObsidianPhoenix opened this issue May 14, 2019 · 6 comments
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Milestone

Comments

@ObsidianPhoenix
Copy link
Contributor

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.

@zadjii-msft
Copy link
Member

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 zadjii-msft changed the title Add Additional fields to Theming Add Optional Cursor Properties to Color Schemes May 14, 2019
@zadjii-msft zadjii-msft added Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels May 14, 2019
@ObsidianPhoenix
Copy link
Contributor Author

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

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added Product-Cmd.exe The issue is related to the legacy command interpreter, CMD.exe. and removed Mass-Chaos labels May 17, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. and removed Product-Cmd.exe The issue is related to the legacy command interpreter, CMD.exe. labels May 17, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@beforan
Copy link

beforan commented 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.

@carlocardella
Copy link
Member

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

@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Nov 6, 2019
@zadjii-msft
Copy link
Member

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

@WinCPP
Copy link

WinCPP commented 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?

ghost pushed a commit that referenced this issue Mar 17, 2020
Add the option to set the cursor color as part of the color scheme.

This is very useful for light themes, where the cursor disappears unless its color
is set in the profile.

Related to issue #764, but doesn't fully resolve it.

## Validation
I tested this manually by creating a light color scheme, setting the cursor color
to black and setting the profile color scheme to the newly created color scheme.
I validated the cursor is black, then set the cursor color in the profile (to red)
and saw it trumps the cursor color from the color scheme.
@zadjii-msft zadjii-msft modified the milestones: Terminal Backlog, Backlog Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

6 participants