Add a configuration object for focused vs unfocused state #4261

Closed
opened 2026-01-30 23:42:23 +00:00 by claunia · 8 comments
Owner

Originally created by @zadjii-msft on GitHub (Oct 4, 2019).

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

Originally created by @zadjii-msft on GitHub (Oct 4, 2019). 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? ```json "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. <sup>[1]</sup> ###### [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. <hr> 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. <hr> 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
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 8, 2019):

Yanking Triage -- this is a neat feature, but it does require a little bit of thinkin' about.

@DHowett-MSFT commented on GitHub (Oct 8, 2019): Yanking Triage -- this is a neat feature, but it does require a little bit of thinkin' about.
Author
Owner

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

@coupez There's actually a bunch of other threads that have covered that discussion, but this isn't one of them. This mostly tracks controlling the appearance of an active pane vs inactive panes, when there are many panes in the same tab. For discussion on how acrylic works, see: #2326, #1886, #1747, #1546, #1505, #1099, #593, #3336, #2763, #2698, #3497

@zadjii-msft commented on GitHub (Nov 26, 2019): @coupez There's actually a bunch of other threads that have covered that discussion, but this isn't one of them. This mostly tracks controlling the appearance of an active pane vs inactive panes, when there are many panes in the same tab. For discussion on how acrylic works, see: #2326, #1886, #1747, #1546, #1505, #1099, #593, #3336, #2763, #2698, #3497
Author
Owner

@solariz commented on GitHub (Feb 26, 2020):

Sure it's "just" a cosmetic thing, but isn't the new Term also about a cosmetic refresh? So for me it is totally annoying having it going totally black when not focused. Looks pretty bad und totally uneccessary.

@solariz commented on GitHub (Feb 26, 2020): Sure it's "just" a cosmetic thing, but isn't the new Term also about a cosmetic refresh? So for me it is totally annoying having it going totally black when not focused. Looks pretty bad und totally uneccessary.
Author
Owner

@anwar3606 commented on GitHub (Jun 6, 2020):

not even a hack for the Acrylic to be present when the focus is lost?

@anwar3606 commented on GitHub (Jun 6, 2020): not even a hack for the Acrylic to be present when the focus is lost?
Author
Owner

@reinux commented on GitHub (Dec 2, 2020):

The lack of Acrylic on background windows turns out to be a deliberate Windows 10 limitation.

Even back on Vista hardware, when there were a ton of false rumors about its resource consumption, Aero Glass being a culprit for battery consumption was ruled out by everyone who bothered to test the theory both in benchmarks and in practical use. It was reducing battery life by less than 1%.

So this decision on the Windows team's part strikes me as being really bizarre, even from a PR standpoint, as it validates those claims. It's been 13 years anyway; the only modern computer I can think of that wouldn't have a GPU that could handle glass in under 0.1% of its energy consumption is a Raspberry Pi.

Glass on bevels is useful, but glass as background for text-heavy applications in the foreground seems like the least appropriate use for it.

What a weird situation to be in.

@reinux commented on GitHub (Dec 2, 2020): The lack of Acrylic on background windows turns out to be [a deliberate Windows 10 limitation](https://docs.microsoft.com/en-us/windows/uwp/design/style/acrylic#usability-and-adaptability). Even back on Vista hardware, when there were a ton of false rumors about its resource consumption, Aero Glass being a culprit for battery consumption was ruled out by everyone who bothered to test the theory both in benchmarks and in practical use. It was reducing battery life by less than 1%. So this decision on the Windows team's part strikes me as being really bizarre, even from a PR standpoint, as it validates those claims. It's been 13 years anyway; the only modern computer I can think of that wouldn't have a GPU that could handle glass in under 0.1% of its energy consumption is a Raspberry Pi. Glass on bevels is useful, but glass as background for text-heavy applications in the foreground seems like the least appropriate use for it. What a weird situation to be in.
Author
Owner

@zadjii-msft commented on GitHub (Dec 2, 2020):

This isn't the thread to discuss whether acrylic should be enabled when the window is focused or not. There's like 11 threads I linked above that are better suited for that discussion. There's also #7158 which is tracking investigating if unfocused acrylic is possible in the Terminal. I'd ask that we re-direct this discussion to that thread, thanks.

@zadjii-msft commented on GitHub (Dec 2, 2020): This isn't the thread to discuss whether acrylic should be enabled when the window is focused or not. There's like 11 threads I linked above that are better suited for that discussion. There's also #7158 which is tracking investigating if unfocused acrylic is possible in the Terminal. I'd ask that we re-direct this discussion to that thread, thanks.
Author
Owner

@ghost commented on GitHub (Apr 14, 2021):

:tada:This issue was addressed in #8392, which has now been successfully released as Windows Terminal Preview v1.8.1032.0.🎉

Handy links:

@ghost commented on GitHub (Apr 14, 2021): :tada:This issue was addressed in #8392, which has now been successfully released as `Windows Terminal Preview v1.8.1032.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.8.1032.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (May 25, 2021):

:tada:This issue was addressed in #8392, which has now been successfully released as Windows Terminal v1.8.1444.0.🎉

Handy links:

@ghost commented on GitHub (May 25, 2021): :tada:This issue was addressed in #8392, which has now been successfully released as `Windows Terminal v1.8.1444.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.8.1444.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4261