Skip to content

Add a configuration object for focused vs unfocused state #3062

@zadjii-msft

Description

@zadjii-msft

Follow up from #994.

Originally suggested by @cdmihai in #994

Hyper changes the text color. The focused pane uses a saturated, bright version of the font color, the out of focus panes use a desaturated, dark version of the font. I found that this makes it quite visually intuitive to instantly notice which pane is active. Yet the other panes are still quite readable.

Sounds like the holy grail would be to have a configuration object for pane switching features (text fonts, background colors, borders, cursor, etc) with some sensible accessible defaults.

Taking that idea and running with it, what if each profile could specify an "unfocused" state that's used when it loses focus?

    "profiles":
    [
        {
            "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "name": "cmd",
            "commandline": "cmd.exe",

            "colorScheme": "Solarized Dark",
            "cursorColor": "#FF00FF",
            "cursorShape": "bar",
            "fontFace": "Consolas",
            "fontSize": 12,
            "foreground": "#C0C0C0",
            "background": "#000000",

            "unfocusedState": 
            {
                "colorScheme": "Campbell",
                "cursorColor": "#888",
                "cursorShape": "emptyBox",
                "foreground": "#C0C0C0",
                "background": "#000000"
            }
        }
    ],

Presumably, backgroundImage settings would also be fine in that block.

Things I wouldn't want to enable in this block:

  • Anything that causes a resize. padding, fontFace, fontSize.
  • The acrylic settings. Acrylic doesn't work when the window isn't focused, and I wouldn't want people to think that it magically will if they add that setting. [1]
[1]: Technically, with split panes, they could have an unfocused control that could still have an acrylic BG, as long as the window remains focused.

I'm realizing now that this is strictly a superset of #2316, and will also resolve that one. I maybe could have just used that thread originally.


26 Mar 2020: #5130 brought up the good point that this should also include enabling the cursor to still be On, even when the control isn't focused

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-SettingsIssues related to settings and customizability, for console or terminalArea-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Issue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions