Add a key binding to set or toggle acrylic #3545

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

Originally created by @moonunit9 on GitHub (Aug 24, 2019).

Ability to quickly toggle opacity on/off through keystrokes. It would switch between 100% and custom setting in properties.

Originally created by @moonunit9 on GitHub (Aug 24, 2019). Ability to quickly toggle opacity on/off through keystrokes. It would switch between 100% and custom setting in properties.
Author
Owner

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

This is something that might pair well with #1142/#1349. We could make an action that quickly toggles between two opacities. The actual design of how we want the action specified might need some thinking, but #1142 will definitely be needed to enable this.

@zadjii-msft commented on GitHub (Aug 26, 2019): This is something that might pair well with #1142/#1349. We could make an action that quickly toggles between two opacities. The actual design of how we want the action specified might need some thinking, but #1142 will definitely be needed to enable this.
Author
Owner

@DHowett-MSFT commented on GitHub (Aug 26, 2019):

This seems related to #830 as well.

@DHowett-MSFT commented on GitHub (Aug 26, 2019): This seems related to #830 as well.
Author
Owner

@DHowett-MSFT commented on GitHub (Aug 26, 2019):

This workitem fits in better with our overall plan to solve all runtime acrylic/transparency shift issues.

@DHowett-MSFT commented on GitHub (Aug 26, 2019): This workitem fits in better with our overall plan to solve all runtime acrylic/transparency shift issues.
Author
Owner

@DHowett commented on GitHub (Jun 26, 2020):

I don't know what I was thinking when I renamed this to have nothing to do with a keybinding.

@DHowett commented on GitHub (Jun 26, 2020): I don't know what I was thinking when I renamed this to have nothing to do with a keybinding.
Author
Owner

@zadjii-msft commented on GitHub (Jun 26, 2020):

Woah what kind of mind reader are you - I was just playing with the command palette this morning and I was thinking that this was something I wanted to do with it.

@zadjii-msft commented on GitHub (Jun 26, 2020): Woah what kind of mind reader are you - I was just playing with the command palette this morning and I was thinking that this was something I wanted to do with it.
Author
Owner

@Jaswir commented on GitHub (May 22, 2023):

@zadjii-msft
Is there a way to get the Windows Terminal Acrylic, but not the windows taskbar?
Or is this an all or nothing thing currently?

@Jaswir commented on GitHub (May 22, 2023): @zadjii-msft Is there a way to get the Windows Terminal Acrylic, but not the windows taskbar? Or is this an all or nothing thing currently?
Author
Owner

@zadjii-msft commented on GitHub (May 22, 2023):

@Jaswir Not that I'm aware of. TransluscentTB might be of some help, not sure though. That's a 3rd-party app I've used in the past to customize the taskbar (though, haven't tried it since Windows 11)

@zadjii-msft commented on GitHub (May 22, 2023): @Jaswir Not that I'm aware of. TransluscentTB might be of some help, not sure though. That's a 3rd-party app I've used in the past to customize the taskbar (though, haven't tried it since Windows 11)
Author
Owner

@Jaswir commented on GitHub (May 22, 2023):

@zadjii-msft

NOTE: BEFORE You Answer This Question, DON'T SPOIL CODE FILE NAMES OR FUNCTION NAMES Mike!!
I wanna figure it out myself, been checking out old PR's and I feel more than confident I'll figure it out.

I have questions about VS Code.
Installed the C/C++ Extensions I got recommended to install from VS Code.
image
image

I assume you have installed these extensions too. Getting rid squigglies for the Header files.
image

I Guess I have to change the compiler path or Include path here.
image

Can you tell me what include path you have? Or Compiler Path?
How did you deal with the red squigglies?

@Jaswir commented on GitHub (May 22, 2023): @zadjii-msft NOTE: BEFORE You Answer This Question, DON'T SPOIL CODE FILE NAMES OR FUNCTION NAMES Mike!! I wanna figure it out myself, been checking out old PR's and I feel more than confident I'll figure it out. I have questions about VS Code. Installed the C/C++ Extensions I got recommended to install from VS Code. ![image](https://github.com/microsoft/terminal/assets/15957528/feba57bb-15ee-416d-b4d2-8ad589c0ade1) ![image](https://github.com/microsoft/terminal/assets/15957528/a12860a5-c512-4a7e-9e3a-891b8cf0d3e2) I assume you have installed these extensions too. Getting rid squigglies for the Header files. ![image](https://github.com/microsoft/terminal/assets/15957528/95ca99e9-75eb-48ce-a640-577c5783876f) I Guess I have to change the compiler path or Include path here. ![image](https://github.com/microsoft/terminal/assets/15957528/2de32cb6-9b28-46a7-ae80-e46046ae6616) Can you tell me what include path you have? Or Compiler Path? How did you deal with the red squigglies?
Author
Owner

@zadjii-msft commented on GitHub (May 22, 2023):

NOTE: BEFORE You Answer This Question, DON'T SPOIL CODE FILE NAMES OR FUNCTION NAMES Mike!!

lmao

How did you deal with the red squigglies?

I'm gonna be real - I ignore them. I've worked in Sublime so long that I'm pretty used to not using full IntelliSense, and I just rely on whatever completion Sublime Text uses. VsCode's seems about on par.

If you figure it out in a way that can be checked into our repo, we'd be happy to have that contribution ☺️

@zadjii-msft commented on GitHub (May 22, 2023): > NOTE: BEFORE You Answer This Question, DON'T SPOIL CODE FILE NAMES OR FUNCTION NAMES Mike!! lmao > How did you deal with the red squigglies? I'm gonna be real - I ignore them. I've worked in Sublime so long that I'm pretty used to not using full IntelliSense, and I just rely on whatever completion Sublime Text uses. VsCode's seems about on par. If you figure it out in a way that can be checked into our repo, we'd be happy to have that contribution ☺️
Author
Owner

@Jaswir commented on GitHub (May 22, 2023):

@zadjii-msft

What do you mean ignore? You code with the red squiggles under some header files, and aren't bothered by it?
Or you disable them?

@Jaswir commented on GitHub (May 22, 2023): @zadjii-msft What do you mean ignore? You code with the red squiggles under some header files, and aren't bothered by it? Or you disable them?
Author
Owner

@zadjii-msft commented on GitHub (May 22, 2023):

Yea I just don't let 'em bother me 😆 The compiler is the source of truth to me, so a couple squiggles usually don't bother me.

Though again, I've been working in this codebase for quite a while. So, I kinda have a gut feel for when the squiggles are real or just the editor.

@zadjii-msft commented on GitHub (May 22, 2023): Yea I just don't let 'em bother me 😆 The compiler is the source of truth to me, so a couple squiggles usually don't bother me. Though again, I've been working in this codebase for quite a while. So, I kinda have a gut feel for when the squiggles are real or just the editor.
Author
Owner

@Jaswir commented on GitHub (May 23, 2023):

@zadjii-msft @DHowett

I have a question about the libraries in this project and more c++ in general libraries. I am kinda learning c++ on the go while I tackle these issues.

I notice: "using namespace winrt::Microsoft::Terminal::Control;"
At the top of this file.

I understand that winrt is an external library.
and that by using that. You don't have to do winrt::Microsoft::Terminal::Control in front of something
Like std::cout but when using namespace std you can do cout

The thing that confuses me is
winrt::Microsoft::Terminal::Settings::Model and <winrt/Microsoft.Terminal.Settings.Model.h>

Since there's also a project in OpenConsole with similar name:
image

Is winrt::Microsoft::Terminal::Settings::Model a library from inside our Open Source Project. An expansion on the standard winrt library? Or is it something Microsoft specific that everyone can use belonging to standard winrt?

Also I find it confusing to work on a project by Microsoft since many libraries are also by Microsoft, so don't know if it is from this project or external. Usually the project I work on is not from Microsoft so this is a new situation.
So I guess I am looking for some clarification.

I am familiar with self-made libraries in C# and then using them so
image
Would be used inside another project with using MathLibrary;
But that's without headers <winrt/Microsoft.Terminal.Settings.Model.h> Seems like a selfmade library? Expansion on standard winrt. In c++ are selfmade libraries defined as projectname + .h?

I tried using #include <winrt/windows.foundation.h> in a testing garden (that's what I call standard newly created (cpp) projects where I just test out smaller versions of puzzles I encounter in bigger projects like this" And that works but winrt/Microsoft doesn't seem to be possible

@Jaswir commented on GitHub (May 23, 2023): @zadjii-msft @DHowett I have a question about the libraries in this project and more c++ in general libraries. I am kinda learning c++ on the go while I tackle these issues. I notice: "using namespace `winrt::Microsoft::Terminal::Control`;" At the top of this file. I understand that winrt is an external library. and that by using that. You don't have to do` winrt::Microsoft::Terminal::Control` in front of something Like `std::cout` but when using namespace std you can do `cout` The thing that confuses me is `winrt::Microsoft::Terminal::Settings::Model` and `<winrt/Microsoft.Terminal.Settings.Model.h>` Since there's also a project in OpenConsole with similar name: ![image](https://github.com/microsoft/terminal/assets/15957528/1e0ea734-5fe2-4366-9d5b-3d56ca54aaf4) Is `winrt::Microsoft::Terminal::Settings::Model` a library from inside our Open Source Project. An expansion on the standard winrt library? Or is it something Microsoft specific that everyone can use belonging to standard winrt? Also I find it confusing to work on a project by Microsoft since many libraries are also by Microsoft, so don't know if it is from this project or external. Usually the project I work on is not from Microsoft so this is a new situation. So I guess I am looking for some clarification. I am familiar with self-made libraries in C# and then using them so ![image](https://github.com/microsoft/terminal/assets/15957528/9ba87b7e-0246-4c22-b7dd-c5f61abd719a) Would be used inside another project with `using MathLibrary;` But that's without headers <winrt/Microsoft.Terminal.Settings.Model.h> Seems like a selfmade library? Expansion on standard winrt. In c++ are selfmade libraries defined as projectname + .h? I tried using `#include <winrt/windows.foundation.h>` in a testing garden (that's what I call standard newly created (cpp) projects where I just test out smaller versions of puzzles I encounter in bigger projects like this" And that works but winrt/Microsoft doesn't seem to be possible
Author
Owner

@Jaswir commented on GitHub (May 23, 2023):

@zadjii-msft @DHowett @carlos-zamora @PankajBhojwani @lhecker @ianjoneill

Yes I strive to become like that. Not getting bothered by it and would really love that.

Yea I just don't let 'em bother me 😆 The compiler is the source of truth to me, so a couple squiggles usually don't bother me.

Though again, I've been working in this codebase for quite a while. So, I kinda have a gut feel for when the squiggles are real or just the editor.

But I have not been working in this codebase for a while. And have no gut feeling for when squiggles are real or just the editor. And am learning cpp as I go while tackling these issues. Did 1 project with cpp and Open CV at Utrecht University in the Netherlands but that's it. Mostly did C# there. I was wondering if you can point me to someone that might give me a tip or some help with it.
I'd rather not have to spend extra time figuring out the VS Code editor and instead spend it on tackling the issue. So if someone could give some advice/tips with that I would appreciate it.

I understand you folks are busy with Microsoft Build, This one can wait I work with VS for now.

@Jaswir commented on GitHub (May 23, 2023): @zadjii-msft @DHowett @carlos-zamora @PankajBhojwani @lhecker @ianjoneill Yes I strive to become like that. Not getting bothered by it and would really love that. > Yea I just don't let 'em bother me 😆 The compiler is the source of truth to me, so a couple squiggles usually don't bother me. > > Though again, I've been working in this codebase for quite a while. So, I kinda have a gut feel for when the squiggles are real or just the editor. But I have not been working in this codebase for a while. And have no gut feeling for when squiggles are real or just the editor. And am learning cpp as I go while tackling these issues. Did 1 project with cpp and Open CV at Utrecht University in the Netherlands but that's it. Mostly did C# there. I was wondering if you can point me to someone that might give me a tip or some help with it. I'd rather not have to spend extra time figuring out the VS Code editor and instead spend it on tackling the issue. So if someone could give some advice/tips with that I would appreciate it. I understand you folks are busy with [Microsoft Build](https://build.microsoft.com/en-US/home), This one can wait I work with VS for now.
Author
Owner

@zadjii-msft commented on GitHub (May 25, 2023):

Is winrt::Microsoft::Terminal::Settings::Model a library from inside our Open Source Project

Ah yes. It is. There's some... more complicated interaction going on here, so I'm gonna try and keep this as straightforward as possible. Some of this will be an oversimplification.

Basically, large parts of the Terminal codebase uses something called C++/WinRT. This is a handy toolchain for building C++ code that interacts with WinRT APIs. Anything you see in the winrt:: namespace is a WinRT type.

WinRT is special, it lets you write code in one language, expose it as a "projection" in the form of a .idl file, and then consume it from another language1 . So you can declare language-agnostic interfaces, classes, APIs, and just consume those APIs however you like.

In the case of C++/WinRT: We've got lots of libraries that implement lots of WinRT types. Those libraries are pretty much all named something like Microsoft.Terminal.*2 , just out of convention. When those libraries (.dll's) are built, they produce a .winmd file, which is basically a compilation of everything in the .idl files for that library. When you're consuming APIs from that dll, we reference that project's winmd, and the C++WinRT tooling automatically generates a winrt/Microsoft.Terminal.Whatever.h to include.

You can then use those types by including that headed and instantiating something like auto foo = winrt::Microsoft::Terminal::Whatever::Foo(). That'll do some internal magic to create an instance of the winrt::Microsoft::Terminal::Whatever::implementation::Foo class, but give it back to the caller in a way such that the caller can user it however the idl defined.

It's about at this point where I'd start getting off into the weeds of "projected types" vs "implementation types", but I think that might be getting too far into the weeds.


tl;dr: Yea, the Terminal solution is composed of a bunch of different projects that each produce self-contained libraries. The winrt/Microsoft.Terminal.Whatever.h headers get generated from those libraries. After including that header, you can use types from that project like winrt::Microsoft::Terminal::Whatever::SomeClass. Everything that's Microsoft.Terminal.* is something from inside this repo. Everything that's under winrt:: is a WinRT API / Class


Please feel free to ask more questions if you have them. C++WinRT is a bit complicated at times - I'm still learning some of the ins-and-outs here 😄


  1. It's certainly possible, but very complicated, and not something we do in the Terminal codebase. ↩︎

  2. Except TerminalApp, which can't be in a nested namespace, because of a XAML bug. ↩︎

@zadjii-msft commented on GitHub (May 25, 2023): > Is `winrt::Microsoft::Terminal::Settings::Model` a library from inside our Open Source Project Ah yes. It is. There's some... more complicated interaction going on here, so I'm gonna try and keep this as straightforward as possible. Some of this will be an oversimplification. Basically, large parts of the Terminal codebase uses something called C++/WinRT. This is a handy toolchain for building C++ code that interacts with WinRT APIs. Anything you see in the `winrt::` namespace is a WinRT type. WinRT is special, it lets you write code in one language, expose it as a "projection" in the form of a `.idl` file, and then consume it from another language[^1]. So you can declare language-agnostic interfaces, classes, APIs, and just consume those APIs however you like. In the case of C++/WinRT: We've got lots of libraries that implement lots of WinRT types. Those libraries are pretty much all named something like `Microsoft.Terminal.*`[^2], just out of convention. When those libraries (.dll's) are built, they produce a `.winmd` file, which is basically a compilation of everything in the `.idl` files for that library. When you're consuming APIs from that dll, we reference that project's `winmd`, and the C++WinRT tooling automatically generates a `winrt/Microsoft.Terminal.Whatever.h` to include. You can then use those types by including that headed and instantiating something like `auto foo = winrt::Microsoft::Terminal::Whatever::Foo()`. That'll do some internal magic to create an instance of the `winrt::Microsoft::Terminal::Whatever::implementation::Foo` class, but give it back to the caller in a way such that the caller can user it however the idl defined. It's about at this point where I'd start getting off into the weeds of ["projected types" vs "implementation types"](https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/faq#what-do-the-projected-type-and-the-implementation-type-mean-), but I think that might be getting too far into the weeds. ---- tl;dr: Yea, the Terminal solution is composed of a bunch of different projects that each produce self-contained libraries. The `winrt/Microsoft.Terminal.Whatever.h` headers get generated from those libraries. After including that header, you can use types from that project like `winrt::Microsoft::Terminal::Whatever::SomeClass`. Everything that's `Microsoft.Terminal.*` is something from inside this repo. Everything that's under `winrt::` is a WinRT API / Class ---- Please feel free to ask more questions if you have them. C++WinRT is a bit complicated at times - I'm still learning some of the ins-and-outs here 😄 [^1]: It's certainly possible, but very complicated, and not something we do in the Terminal codebase. [^2]: Except `TerminalApp`, which can't be in a nested namespace, because of a XAML bug.
Author
Owner

@Jaswir commented on GitHub (May 26, 2023):

@zadjii-msft

Tried setting up your setup (without teams and spotifiy, only have 2 monitors, so only left and middle one):
image

Would like to have a setup with VSCode and VS where I can write C++ code in VSCode without any red or blue squigglies that don't belong. And only use VS for Debugging. Ignoring the squiggles is no option for me.

But VSCode is driving me crazy with the errors. I fixed some of include errors by adding some paths:

 "includePath": [
                "${workspaceFolder}/**",
                "C:\\terminal\\packages\\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\\include",
                "C:\\Program Files (x86)\\Windows Kits\\10\\Include",
                "C:\\terminal\\src\\cascadia\\TerminalSettingsModel\\Generated Files" (This one doesn't seem to work well)
]

It's like everytime I get rid of 1 red or blue squiggly another pops up >.<
image
image

Some folders aren't showing up in VS Code folders that contain the missing libraries.
terminal\packages
C:\terminal\src\cascadia\TerminalApp\Generated Files

other folders (not containing libraries):
obj
bin

Help Mike? Perhaps figure out why these folders aren't showing up in VSCode?
The way things are now I am giving up and going to just disable all squigglies and use VS and VSCode just for accessing files outside of the Solution.

@Jaswir commented on GitHub (May 26, 2023): @zadjii-msft Tried setting up your setup (without teams and spotifiy, only have 2 monitors, so only left and middle one): ![image](https://github.com/microsoft/terminal/assets/15957528/22b4117c-6d27-437d-8cc6-653b93910bff) Would like to have a setup with VSCode and VS where I can write C++ code in VSCode without any red or blue squigglies that don't belong. And only use VS for Debugging. Ignoring the squiggles is no option for me. But VSCode is driving me crazy with the errors. I fixed some of include errors by adding some paths: ``` "includePath": [ "${workspaceFolder}/**", "C:\\terminal\\packages\\Microsoft.Windows.ImplementationLibrary.1.0.220201.1\\include", "C:\\Program Files (x86)\\Windows Kits\\10\\Include", "C:\\terminal\\src\\cascadia\\TerminalSettingsModel\\Generated Files" (This one doesn't seem to work well) ] ``` It's like everytime I get rid of 1 red or blue squiggly another pops up >.< ![image](https://github.com/microsoft/terminal/assets/15957528/af088ef7-b3c1-4f39-9d78-6bfa0cb88b3b) ![image](https://github.com/microsoft/terminal/assets/15957528/4ff43470-bcf0-4c77-9c4f-2435b135ee71) Some folders aren't showing up in VS Code folders that contain the missing libraries. terminal\\packages C:\terminal\src\cascadia\TerminalApp\Generated Files other folders (not containing libraries): obj bin Help Mike? Perhaps figure out why these folders aren't showing up in VSCode? The way things are now I am giving up and going to just disable all squigglies and use VS and VSCode just for accessing files outside of the Solution.
Author
Owner

@Jaswir commented on GitHub (May 26, 2023):

@zadjii-msft

WinRT is special, it lets you write code in one language, expose it as a "projection" in the form of a .idl file, and then consume it from another language1. So you can declare language-agnostic interfaces, classes, APIs, and just consume those APIs however you like.

Yeah I noticed there is C++, C and C# all in one codebase. Does this work out of the box since they are all Microsoft created (not sure about C) . Or does WinRT Play a part here with consuming from another language thing you mentioned?

@Jaswir commented on GitHub (May 26, 2023): @zadjii-msft > WinRT is special, it lets you write code in one language, expose it as a "projection" in the form of a `.idl` file, and then consume it from another language[1](#user-content-fn-1-c102651fa6ccadf5e5906efdea47a551). So you can declare language-agnostic interfaces, classes, APIs, and just consume those APIs however you like. Yeah I noticed there is C++, C and C# all in one codebase. Does this work out of the box since they are all Microsoft created (not sure about C) . Or does WinRT Play a part here with consuming from another language thing you mentioned?
Author
Owner

@Jaswir commented on GitHub (May 27, 2023):

the C++WinRT tooling automatically generates a winrt/Microsoft.Terminal.Whatever.h to include.

That Self Generation part is tricky about this project. Thanks for the tip.

@Jaswir commented on GitHub (May 27, 2023): > the C++WinRT tooling automatically generates a `winrt/Microsoft.Terminal.Whatever.h` to include. That Self Generation part is tricky about this project. Thanks for the tip.
Author
Owner

@zadjii-msft commented on GitHub (May 28, 2023):

okay so this is just me messing around on the weekend. I can look more on Tuesday.

Clearly, I don't understand how vscode config works, cause this doesn't seem scalable:

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",
                "${workspaceFolder}/packages/Microsoft.Taef.10.60.210621002/build/Include/**",
                "${workspaceFolder}/packages/Microsoft.Windows.ImplementationLibrary.1.0.220201.1/include/**",
                "${workspaceFolder}/src/cascadia/TerminalSettingsModel/Generated Files",
                "${workspaceFolder}/src/cascadia/TerminalApp/Generated Files"
                // It was at this point I realized this wouldn't work, as I'd have to add each manually?? That's not right.
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.22621.0",
            "compilerPath": "cl.exe",
            "cStandard": "c17",
            "cppStandard": "c++20",
            "intelliSenseMode": "windows-msvc-x64",
            "browse": {
                "path": [
                    "${workspaceFolder}",
                    "${workspaceFolder}/packages/Microsoft.Taef.10.60.210621002/build/Include",
                    "${workspaceFolder}/packages/Microsoft.Windows.ImplementationLibrary.1.0.220201.1/include"
                ]
            }
        }
    ],
    "version": 4
}

It's like, it's ignoring all the paths that have autogenerated things, or are in our gitignore... hmmm

@zadjii-msft commented on GitHub (May 28, 2023): okay so this is just me messing around on the weekend. I can look more on Tuesday. Clearly, I don't understand how vscode config works, cause this doesn't seem scalable: ```jsonc { "configurations": [ { "name": "Win32", "includePath": [ "${workspaceFolder}/**", "${workspaceFolder}/packages/Microsoft.Taef.10.60.210621002/build/Include/**", "${workspaceFolder}/packages/Microsoft.Windows.ImplementationLibrary.1.0.220201.1/include/**", "${workspaceFolder}/src/cascadia/TerminalSettingsModel/Generated Files", "${workspaceFolder}/src/cascadia/TerminalApp/Generated Files" // It was at this point I realized this wouldn't work, as I'd have to add each manually?? That's not right. ], "defines": [ "_DEBUG", "UNICODE", "_UNICODE" ], "windowsSdkVersion": "10.0.22621.0", "compilerPath": "cl.exe", "cStandard": "c17", "cppStandard": "c++20", "intelliSenseMode": "windows-msvc-x64", "browse": { "path": [ "${workspaceFolder}", "${workspaceFolder}/packages/Microsoft.Taef.10.60.210621002/build/Include", "${workspaceFolder}/packages/Microsoft.Windows.ImplementationLibrary.1.0.220201.1/include" ] } } ], "version": 4 } ``` It's like, it's ignoring all the paths that have autogenerated things, or are in our gitignore... hmmm
Author
Owner

@Jaswir commented on GitHub (Jun 2, 2023):

@zadjii-msft

Also since you're on Paternity leave who can I ask questions in your stead? Btw congrats.

Have been looking at this problem for a while and while I do move forward as I put more time in it and learn more C++ and get a much better understanding of how the entire codebase works. Like I am starting to understand how the Generated Files are working with C++/Winrt (how changes in the idl, create some other files) and can make small adaptions in smaller new imagetest projects.

Honestly if you'd pointed me here: https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/intro-to-using-cpp-with-winrt That would've helped much more/faster.

But I feel like it can take me quite an amount of hours before I finish the issue this way.

What would make one a better Engineer you think? Keep going at it and get a much deeper understanding of the codebase and C++? Even though I'd get a much deeper understanding there's still a lot to the codebase I won't get from this issue I think and for an Engineer trying to fully grasp every codebase would take a lot of extra time leading to less issues solved per month. But having a much deeper understanding would help solve issues faster in the long run.

Or ask more questions and aim for better performance in terms of issues solved per month?

I watched this video: https://www.youtube.com/watch?v=UHyX9zBluMw&ab_channel=ArmanKhondker
Where at 4.11 The guy says "If I can't unblock myself in 1 hour, I reach out for help".
What is it like at Microsoft? Do engineers ask for help fast, after 1 hour being blocked?

@Jaswir commented on GitHub (Jun 2, 2023): @zadjii-msft Also since you're on Paternity leave who can I ask questions in your stead? Btw congrats. Have been looking at this problem for a while and while I do move forward as I put more time in it and learn more C++ and get a much better understanding of how the entire codebase works. Like I am starting to understand how the Generated Files are working with C++/Winrt (how changes in the idl, create some other files) and can make small adaptions in smaller new ![image](https://github.com/microsoft/terminal/assets/15957528/de3af958-6959-4f4f-9091-8e77e6fd206b)test projects. Honestly if you'd pointed me here: https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/intro-to-using-cpp-with-winrt That would've helped much more/faster. But I feel like it can take me quite an amount of hours before I finish the issue this way. What would make one a better Engineer you think? Keep going at it and get a much deeper understanding of the codebase and C++? Even though I'd get a much deeper understanding there's still a lot to the codebase I won't get from this issue I think and for an Engineer trying to fully grasp every codebase would take a lot of extra time leading to less issues solved per month. But having a much deeper understanding would help solve issues faster in the long run. Or ask more questions and aim for better performance in terms of issues solved per month? I watched this video: https://www.youtube.com/watch?v=UHyX9zBluMw&ab_channel=ArmanKhondker Where at 4.11 The guy says "If I can't unblock myself in 1 hour, I reach out for help". What is it like at Microsoft? Do engineers ask for help fast, after 1 hour being blocked?
Author
Owner

@Jaswir commented on GitHub (Jun 2, 2023):

@DHowett

Since Mike is on Paternity leave who can I ask questions in his stead?

@Jaswir commented on GitHub (Jun 2, 2023): @DHowett Since Mike is on Paternity leave who can I ask questions in his stead?
Author
Owner

@Jaswir commented on GitHub (Jun 2, 2023):

@zadjii-msft

I'm getting stuck from multiple sides I think it's about time I start asking questions.
So let me tell you what I got so far, where I'm getting stuck.
I think I found a majority of the places I'll need to make changes.

What I got so far:
Figured I needed to add ToggleOpacity to the command palette.
Added
image
to terminal\src\cascadia\TerminalSettingsModel\Resources\en-US\Resources.resw

Was able to then substitute that with ExportBufferCommandKey Variants:
image

So then I tried a couple angles to tackle the problem. And when writing this, I actually got even further.
First angle:
Add _HandleToggleOpacity in AppActionHandlers.cpp
Noticed _HandleAdjustOpacity does similar functionality to HandleToggleOpacity
Tried to run _HandleAdjustOpacity when __HandleExportBuffer is run.
Figured I could bypass argument checking and just fill in the parameters.

image

So far I got this:
what_i_got_so_far

Where I got stuck
Then when actually trying to code it all neatly with _HandleToggleOpacity, ToggleOpacityArgs and Shortcut commands, things got really overwhelming.

Have been looking everywhere for a file where specific shorcuts are stored and can be adapted. Only thing I could find
C:\terminal\src\cascadia\TerminalSettingsModel\defaults.json

But on top of the file it says:
image

So then I spend hours looking for something better.
But then when I do make a change it IS NOT ignored??
And apparently this file is not auto-generated cause when I delete it, clean the solution and rebuild it doesn't get recreated. So??? Do I have to make those shortcut storage changes here? Or someplace else? And if so where?

Oh got this now:
what_i_got_so_far_command_hijack

Just hijacked: _HandleOpenSystemMenu this time

Will continue writing later about where I got stuck

@Jaswir commented on GitHub (Jun 2, 2023): @zadjii-msft I'm getting stuck from multiple sides I think it's about time I start asking questions. So let me tell you what I got so far, where I'm getting stuck. I think I found a majority of the places I'll need to make changes. **What I got so far:** Figured I needed to add ToggleOpacity to the command palette. Added ![image](https://github.com/microsoft/terminal/assets/15957528/2d83b741-6e67-4e59-86c6-a91c333f5c9e) to terminal\src\cascadia\TerminalSettingsModel\Resources\en-US\Resources.resw Was able to then substitute that with ExportBufferCommandKey Variants: ![image](https://github.com/microsoft/terminal/assets/15957528/80e0481b-3381-4ea5-92ff-b9dd838f697d) So then I tried a couple angles to tackle the problem. And when writing this, I actually got even further. First angle: Add _HandleToggleOpacity in AppActionHandlers.cpp Noticed _HandleAdjustOpacity does similar functionality to HandleToggleOpacity Tried to run _HandleAdjustOpacity when __HandleExportBuffer is run. Figured I could bypass argument checking and just fill in the parameters. ![image](https://github.com/microsoft/terminal/assets/15957528/3c5398c1-2881-4ffa-92c5-c1d37472ff7e) So far I got this: ![what_i_got_so_far](https://github.com/microsoft/terminal/assets/15957528/e8198c86-887a-4e51-8480-c8a1111405c8) **Where I got stuck** Then when actually trying to code it all neatly with _HandleToggleOpacity, ToggleOpacityArgs and Shortcut commands, things got really overwhelming. Have been looking everywhere for a file where specific shorcuts are stored and can be adapted. Only thing I could find C:\terminal\src\cascadia\TerminalSettingsModel\defaults.json But on top of the file it says: ![image](https://github.com/microsoft/terminal/assets/15957528/766be2aa-774c-4b62-98d3-4045196d46c7) So then I spend hours looking for something better. But then when I do make a change it IS NOT ignored?? And apparently this file is not auto-generated cause when I delete it, clean the solution and rebuild it doesn't get recreated. So??? Do I have to make those shortcut storage changes here? Or someplace else? And if so where? Oh got this now: ![what_i_got_so_far_command_hijack](https://github.com/microsoft/terminal/assets/15957528/3f148774-2925-431d-9057-7e450aedf8e2) Just hijacked: _HandleOpenSystemMenu this time Will continue writing later about where I got stuck
Author
Owner

@DHowett commented on GitHub (Jun 3, 2023):

@DHowett

Since Mike is on Paternity leave who can I ask questions in his stead?

I'd be happy to try and answer questions! Since the weekend is coming up, I can't promise that we'll answer very quickly 😄

I'm so sorry about that defaults.json thing. We put that comment at the top in our source code so that when it gets put into the final application (defaults.json inside the MSIX file!) it says that. It's to tell users that it can't be edited... but since you're looking at the copy that lives in the source code you absolutely can edit it.

Shortcuts are loaded from there by default, that's how it knows all the ones that exist.

Doing it with ToggleOpacity will require adding more handlers to "ActionArgs" and "ActionAndArgs" (silly names), which implement most of the automatic stuff that lets you write code for an action. It has been a while since I added one myself. I will have to do some research if that is not helpful enough.

@DHowett commented on GitHub (Jun 3, 2023): > @DHowett > > Since Mike is on Paternity leave who can I ask questions in his stead? I'd be happy to try and answer questions! Since the weekend is coming up, I can't promise that we'll answer very _quickly_ :smile: I'm so sorry about that `defaults.json` thing. We put that comment at the top _in our source code_ so that when it gets put into the final application (`defaults.json` _inside the MSIX file!_) it says that. It's to tell users that it can't be edited... but since you're looking at the copy that lives in the source code you absolutely can edit it. Shortcuts are loaded from there by default, that's how it knows all the ones that exist. Doing it with ToggleOpacity will require adding more handlers to "ActionArgs" and "ActionAndArgs" (silly names), which implement most of the automatic stuff that lets you write code for an action. It has been a while since I added one myself. I will have to do some research if that is not helpful enough.
Author
Owner

@Jaswir commented on GitHub (Jun 3, 2023):

@DHowett I see, thanks for clearing things up about shortcuts.
Silly question, what is a MSIX file?

@Jaswir commented on GitHub (Jun 3, 2023): @DHowett I see, thanks for clearing things up about shortcuts. Silly question, what is a MSIX file?
Author
Owner

@Jaswir commented on GitHub (Jun 3, 2023):

@moonunit9 @zadjii-msft @DHowett

About the feature request:
"Ability to quickly toggle opacity on/off through keystrokes. It would switch between 100% and custom setting in properties."

Where would you like this setting to be?
in settings.json?
image

Like this for example:
image

Or here?, like this:

image

Or both?

@Jaswir commented on GitHub (Jun 3, 2023): @moonunit9 @zadjii-msft @DHowett About the feature request: "Ability to quickly toggle opacity on/off through keystrokes. It would switch between 100% and custom setting in properties." Where would you like this setting to be? in settings.json? ![image](https://github.com/microsoft/terminal/assets/15957528/661a1207-da7e-4bcc-bc1d-bea99e531cae) Like this for example: ![image](https://github.com/microsoft/terminal/assets/15957528/d6167eb1-240f-4c4b-8634-ac1ab850ad42) Or here?, like this: ![image](https://github.com/microsoft/terminal/assets/15957528/62a3fe54-f300-48de-8966-84bc8100782b) Or both?
Author
Owner

@Jaswir commented on GitHub (Jun 3, 2023):

@DHowett
When will Mike be back?

@Jaswir commented on GitHub (Jun 3, 2023): @DHowett When will Mike be back?
Author
Owner

@Jaswir commented on GitHub (Jun 3, 2023):

@zadjii-msft @DHowett

I'm so sorry about that defaults.json thing. We put that comment at the top in our source code so that when it gets put into the final application (defaults.json inside the MSIX file!) it says that. It's to tell users that it can't be edited... but since you're looking at the copy that lives in the source code you absolutely can edit it.

Shortcuts are loaded from there by default, that's how it knows all the ones that exist.

I suggest also adapting the comments there to make it clear the comment is aimed at users, not developers. Maybe it could save others hours of time looking for something better. I can immediately apply this while solving this issue.

// THIS IS AN AUTO-GENERATED FILE! Changes to this file will be ignored.

==>

Suggestion:

//TO USERS: THIS IS AN AUTO-GENERATED FILE! Changes to this file will be ignored.
//TO DEVELOPERS OF WINDOWS TERMINAL: YOU CAN ABSOLUTELY EDIT THIS FILE, CHANGES WILL BE APPLIED
//SHORTCUTS ARE LOADED FROM HERE BY DEFAULTS, THAT'S HOW IT KNOWS ALL THE ONES THAT EXIST

@Jaswir commented on GitHub (Jun 3, 2023): @zadjii-msft @DHowett > I'm so sorry about that `defaults.json` thing. We put that comment at the top _in our source code_ so that when it gets put into the final application (`defaults.json` _inside the MSIX file!_) it says that. It's to tell users that it can't be edited... but since you're looking at the copy that lives in the source code you absolutely can edit it. > > Shortcuts are loaded from there by default, that's how it knows all the ones that exist. I suggest also adapting the comments there to make it clear the comment is aimed at users, not developers. Maybe it could save others hours of time looking for something better. I can immediately apply this while solving this issue. // THIS IS AN AUTO-GENERATED FILE! Changes to this file will be ignored. ==> Suggestion: //TO USERS: THIS IS AN AUTO-GENERATED FILE! Changes to this file will be ignored. //TO DEVELOPERS OF WINDOWS TERMINAL: YOU CAN ABSOLUTELY EDIT THIS FILE, CHANGES WILL BE APPLIED //SHORTCUTS ARE LOADED FROM HERE BY DEFAULTS, THAT'S HOW IT KNOWS ALL THE ONES THAT EXIST
Author
Owner

@Jaswir commented on GitHub (Jun 3, 2023):

@DHowett

terminal\doc\cascadia\profiles.schema.json
Looked at this file also for a while, thinking it might have some use for the solution.
This file, seems to have relevant information, but when I delete everything, clean and rebuild nothing breaks?
I don't understand this files purpose ... What does it do?

@Jaswir commented on GitHub (Jun 3, 2023): @DHowett terminal\doc\cascadia\profiles.schema.json Looked at this file also for a while, thinking it might have some use for the solution. This file, seems to have relevant information, but when I delete everything, clean and rebuild nothing breaks? I don't understand this files purpose ... What does it do?
Author
Owner

@Jaswir commented on GitHub (Jun 3, 2023):

@DHowett

Blocked on this problem for a couple hours now.
Trying to add ToggleOpacity inside of Command palette as a separate command and connect that to _HandleToggleOpacity in AppActionHandlers.cpp, but it doesn't appear in the command palette when I press ctrl+shift+p. I was able to get _HandleToggleOpacity in AppActionHandlers.cpp.

I added
{ ShortcutAction::ToggleOpacity, RS_(L"ToggleOpacityCommandKey") }
in ActionAndArgs.cpp -> GenerateName
and ofcourse on top of file :
static constexpr std::string_view ToggleOpacityKey{ "toggleOpacity" };

and
ON_ALL_ACTIONS(ToggleOpacity)
To AllShortcutActions.h -> ALL_SHORTCUT_ACTIONS macro

Wondering if you could give me a tip / clue to unblock me?
I tried ctrl+shift+f in VS Code looking for OpenSystem, to see whether I missed something. But not getting much wiser from it. c++/winrt with it's .idl file magic + macro's automatically creating stuff all over the place. Can make things tricky.

@Jaswir commented on GitHub (Jun 3, 2023): @DHowett Blocked on this problem for a couple hours now. Trying to add ToggleOpacity inside of Command palette as a separate command and connect that to _HandleToggleOpacity in AppActionHandlers.cpp, but it doesn't appear in the command palette when I press ctrl+shift+p. I was able to get _HandleToggleOpacity in AppActionHandlers.cpp. I added `{ ShortcutAction::ToggleOpacity, RS_(L"ToggleOpacityCommandKey") } ` in ActionAndArgs.cpp -> GenerateName and ofcourse on top of file : `static constexpr std::string_view ToggleOpacityKey{ "toggleOpacity" };` and ` ON_ALL_ACTIONS(ToggleOpacity) ` To AllShortcutActions.h -> ALL_SHORTCUT_ACTIONS macro Wondering if you could give me a tip / clue to unblock me? I tried ctrl+shift+f in VS Code looking for OpenSystem, to see whether I missed something. But not getting much wiser from it. c++/winrt with it's .idl file magic + macro's automatically creating stuff all over the place. Can make things tricky.
Author
Owner

@DHowett commented on GitHub (Jun 3, 2023):

Excellent questions! In order...

what is a MSIX file?

Oh, sorry. That's the installer for Terminal. It is a "packaged application".

Where would you like this setting to be?

It should show up in Actions, because it is an action that the user can assign to a keyboard key. That means in the JSON file it would show up in the "actions" section (either defaults.json or settings.json). It would also show up in the "actions" section in the settings UI!

When will Mike be back?

In a few weeks!

...adapting the comments in defaults.json...

Not a bad idea. However, adding a message for the developers of Terminal to that file mean that all 170 million users also need to have a copy of the message that's for developers only. We can work on making it clearer, for sure.

schema.json

That is the file that tells Visual Studio Code what keys and values are "legal" when you are editing settings.json! It says "a profile can have these things inside it" and "these are the actions that are legal after the 'action' key".

Adding ToggleOpacity inside the Command Palette

Those three places - ActionAndArgs GenerateName, the key name, and ON_ALL_ACTIONS are the right places to put it!

I believe the last place you need to look is defaults.json, in the "actions" section.
It might be like these ones:

8aefc7a697/src/cascadia/TerminalSettingsModel/defaults.json (L374-L376)

If you have hooked it up correctly, that is the last "piece" you need since this file tells Terminal which actions should be created by default.1


  1. This is not my favorite part of our code, because it does mean that when you add a new action it needs to happen in approximately four separate places. ☹️ ↩︎

@DHowett commented on GitHub (Jun 3, 2023): Excellent questions! In order... > what is a MSIX file? Oh, sorry. That's the installer for Terminal. It is a "packaged application". > Where would you like this setting to be? It should show up in Actions, because it is an action that the user can assign to a keyboard key. That means in the JSON file it would show up in the "actions" section (either defaults.json or settings.json). It would also show up in the "actions" section in the settings UI! > When will Mike be back? In a few weeks! > ...adapting the comments in defaults.json... Not a bad idea. However, adding a message for the developers of Terminal to that file mean that all 170 million users _also_ need to have a copy of the message that's for developers only. We can work on making it clearer, for sure. > schema.json That is the file that tells Visual Studio Code what keys and values are "legal" when you are editing settings.json! It says "a profile can have these things inside it" and "these are the actions that are legal after the 'action' key". > Adding ToggleOpacity inside the Command Palette Those three places - ActionAndArgs GenerateName, the key name, and `ON_ALL_ACTIONS` are the right places to put it! I believe the last place you need to look is `defaults.json`, in the "actions" section. It might be like these ones: https://github.com/microsoft/terminal/blob/8aefc7a697ec155258d2fc0d84ea3466aaa0754e/src/cascadia/TerminalSettingsModel/defaults.json#L374-L376 If you have hooked it up correctly, that is the last "piece" you need since this file tells Terminal which actions should be created by default.[^1] [^1]: This is not my favorite part of our code, because it does mean that when you add a new action it needs to happen in approximately four separate places. ☹️
Author
Owner

@Jaswir commented on GitHub (Jun 7, 2023):

@DHowett

Those three places - ActionAndArgs GenerateName, the key name, and ON_ALL_ACTIONS are the right places to put it!

I believe the last place you need to look is defaults.json, in the "actions" section. It might be like these ones:

Already had it in the file, but it wasn't working, but now it is. Ah well whatever , it works now I guess :)

I believe the last place you need to look is defaults.json, in the "actions" section. It might be like these ones:

Doing it with ToggleOpacity will require adding more handlers to "ActionArgs" and "ActionAndArgs" (silly names), which implement most of the automatic stuff that lets you write code for an action. It has been a while since I added one myself. I will have to do some research if that is not helpful enough.

Honestly I don't feel comfortable being pointed to the precise files.
I am worried about my development as an Engineer.

A big part of me helping out in this Open Source project is wanting to become a great Engineer like you. Getting pointed to the filenames conflicts with that.

Basically the give a man a fish idea: “If you give a man a fish, you feed him for a day. If you teach a man to fish, you feed him for a lifetime.” A good Engineer is able to think for themselves, find the specific files themselves right?
In real life software engineering situations more often than not, there won't be someone pointing me to the filenames right? By having you point me to them, you are effectively doing the thinking for me. And so without that I'd be lost right?

At the same time I have been kinda running in circles with this one for a while. And having some confirmation with the filenames is nice.

@Jaswir commented on GitHub (Jun 7, 2023): @DHowett > Those three places - ActionAndArgs GenerateName, the key name, and `ON_ALL_ACTIONS` are the right places to put it! > > I believe the last place you need to look is `defaults.json`, in the "actions" section. It might be like these ones: Already had it in the file, but it wasn't working, but now it is. Ah well whatever , it works now I guess :) > I believe the last place you need to look is defaults.json, in the "actions" section. It might be like these ones: > Doing it with ToggleOpacity will require adding more handlers to "ActionArgs" and "ActionAndArgs" (silly names), which implement most of the automatic stuff that lets you write code for an action. It has been a while since I added one myself. I will have to do some research if that is not helpful enough. Honestly I don't feel comfortable being pointed to the precise files. I am worried about my development as an Engineer. A big part of me helping out in this Open Source project is wanting to become a great Engineer like you. Getting pointed to the filenames conflicts with that. Basically the give a man a fish idea: “If you give a man a fish, you feed him for a day. If you teach a man to fish, you feed him for a lifetime.” A good Engineer is able to think for themselves, find the specific files themselves right? In real life software engineering situations more often than not, there won't be someone pointing me to the filenames right? By having you point me to them, you are effectively doing the thinking for me. And so without that I'd be lost right? At the same time I have been kinda running in circles with this one for a while. And having some confirmation with the filenames is nice.
Author
Owner

@Jaswir commented on GitHub (Jun 9, 2023):

@DHowett

It should show up in Actions, because it is an action that the user can assign to a keyboard key. That means in the JSON file it would show up in the "actions" section (either defaults.json or settings.json). It would also show up in the "actions" section in the settings UI!

It should also show up in settings.json. So should have an entry in schema.json.
And it should also be available in the settings.json right, like that, so you can set a value there and then make it toggle to that opacity.
image

PS: don't point to filenames If it needs to be stored there unless it would make me a great engineer like you maybe I am overthinking this. Do Engineers at Microsoft also get pointed to filenames???

That is the file that tells Visual Studio Code what keys and values are "legal" when you are editing settings.json! It says "a profile can have these things inside it" and "these are the actions that are legal after the 'action' key".

I removed Schema.json
Cleaned project, rebuild.
But still all the properties are there to choose from in visual studio code???
I expect them to be gone, based on what you say.

schema-json-not-doing-stuff-yet

@Jaswir commented on GitHub (Jun 9, 2023): @DHowett > It should show up in Actions, because it is an action that the user can assign to a keyboard key. That means in the JSON file it would show up in the "actions" section (either defaults.json or settings.json). It would also show up in the "actions" section in the settings UI! It should also show up in settings.json. So should have an entry in schema.json. And it should also be available in the settings.json right, like that, so you can set a value there and then make it toggle to that opacity. ![image](https://github.com/microsoft/terminal/assets/15957528/0cfb1087-7baf-455b-9454-ef6ecdfb7da3) PS: don't point to filenames If it needs to be stored there unless it would make me a great engineer like you maybe I am overthinking this. Do Engineers at Microsoft also get pointed to filenames??? > That is the file that tells Visual Studio Code what keys and values are "legal" when you are editing settings.json! It says "a profile can have these things inside it" and "these are the actions that are legal after the 'action' key". I removed Schema.json Cleaned project, rebuild. But still all the properties are there to choose from in visual studio code??? I expect them to be gone, based on what you say. ![schema-json-not-doing-stuff-yet](https://github.com/microsoft/terminal/assets/15957528/eb5b266a-7318-43a2-82a0-5d377442703f)
Author
Owner

@Jaswir commented on GitHub (Jun 9, 2023):

@DHowett This is what I got so far, almost done. Only need to use toggleOpacity instead of backgroundImageOpacity. That's where I am blocked now.

what_I_got_so_far_2

It's not the same without Mike. For me what makes programming work fun is adding value to the team and being appreciated for that and social communication. This energizes me. Without @zadjii-msft I think Ima take a break too after finishing this one since I am so close. Till Mike is back. Hence why I can't make projects on my own, and seek collabs like open source. Let me know when you're back @zadjii-msft

@Jaswir commented on GitHub (Jun 9, 2023): @DHowett This is what I got so far, almost done. Only need to use toggleOpacity instead of backgroundImageOpacity. That's where I am blocked now. ![what_I_got_so_far_2](https://github.com/microsoft/terminal/assets/15957528/df7a6f49-4dd5-4356-bc9d-84fe1904eb95) It's not the same without Mike. For me what makes programming work fun is adding value to the team and being appreciated for that and social communication. This energizes me. Without @zadjii-msft I think Ima take a break too after finishing this one since I am so close. Till Mike is back. Hence why I can't make projects on my own, and seek collabs like open source. Let me know when you're back @zadjii-msft
Author
Owner

@Jaswir commented on GitHub (Jun 9, 2023):

@DHowett

Maybe a tip/hint here??
Trying to make a change to the properties by changing BackgroundImageOpacity to BackgroundImageOpacity22. Changed BackgroundImageOpacity any place I could find it in the code to BackgroundImageOpacity22, but didn't work. Get 100+ errors. I noticed some of the macro's do a lot of work under the hood that you can't really look for with ctrl+shift+f in VS-Code. It could be I missed a Macro? Or I changed all the names in all files at once and somehow something didn't get generated because of doing this?

I changed this to 22 in Appearances.idl:
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Double, BackgroundImageOpacity22);

And this in Appearances.h:

OBSERVABLE_PROJECTED_SETTING(_appearance, BackgroundImageOpacity22);

So I expect that backgroundimageopacity22 should have been generated as observable projected settings but appearently cause it says this:
image

Am I missing something?

But
image

@Jaswir commented on GitHub (Jun 9, 2023): @DHowett Maybe a tip/hint here?? Trying to make a change to the properties by changing BackgroundImageOpacity to BackgroundImageOpacity22. Changed BackgroundImageOpacity any place I could find it in the code to BackgroundImageOpacity22, but didn't work. Get 100+ errors. I noticed some of the macro's do a lot of work under the hood that you can't really look for with ctrl+shift+f in VS-Code. It could be I missed a Macro? Or I changed all the names in all files at once and somehow something didn't get generated because of doing this? I changed this to 22 in Appearances.idl: ` OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Double, BackgroundImageOpacity22);` And this in Appearances.h: ` OBSERVABLE_PROJECTED_SETTING(_appearance, BackgroundImageOpacity22);` So I expect that backgroundimageopacity22 should have been generated as observable projected settings but appearently cause it says this: ![image](https://github.com/microsoft/terminal/assets/15957528/952c4335-036a-46d8-8fef-fe3df6c50112) Am I missing something? But ![image](https://github.com/microsoft/terminal/assets/15957528/1a843023-4066-4827-814b-eb6fec9cf9e7)
Author
Owner

@Jaswir commented on GitHub (Jul 3, 2023):

@zadjii-msft
Hi Mike, congrats on your new child. Hope you had a nice paternity leave. Your status said on paternity leave for June, and June is over. But the status is still there. I was wondering whether you're back?

And can maybe help with above mentioned blocker?
Looking forward to finish this issue. And atleast get a second issue done in an open source project this time, before giving up. Or even better, not giving up and going for more issues :D

@DHowett
You know whether Mike is back yet? Or when he'll be back?

@Jaswir commented on GitHub (Jul 3, 2023): @zadjii-msft Hi Mike, congrats on your new child. Hope you had a nice paternity leave. Your status said on paternity leave for June, and June is over. But the status is still there. I was wondering whether you're back? And can maybe help with above mentioned blocker? Looking forward to finish this issue. And atleast get a second issue done in an open source project this time, before giving up. Or even better, not giving up and going for more issues :D @DHowett You know whether Mike is back yet? Or when he'll be back?
Author
Owner

@zadjii-msft commented on GitHub (Jul 5, 2023):

Hey, sorry for the delay. Yesterday was a holiday so it was a bit of an extra long weekend at the end of the vacation ☺️ Still trudging through a large pile of emails, but lemme see if I can't unblock you.

From just skimming this thread, it looks like you've got the action set up to plumb into the TermControl / ControlCore layer. That's great! I think you might be a bit off track with the OBSERVABLE_PROJECTED_SETTING bit. Try looking at this instead:

94e6b91c78/src/cascadia/TerminalControl/ControlCore.h (L234-L235)

Those two are special - they're control properties that could be changable at runtime1 . There's already an action for setting Opacity at runtime2 . We were prepared though, and knew we wanted to do a similar thing with acrylic, so we pre-emptively made that a RUNTIME_SETTING so it could also be changed in a similar way. I'd start there.

PS: don't point to filenames If it needs to be stored there unless it would make me a great engineer like you maybe I am overthinking this. Do Engineers at Microsoft also get pointed to filenames???

We absofuckinglutely do, all the time. Dustin linked me a file path literally this morning. It's 1000x better to ask for help and quickly get pointed in the right direction, then spin your wheels for a couple days. There's literally no shame in admitting you don't know something, and asking for help.


  1. I believe added in #11619 ↩︎

  2. added in #12092 ↩︎

@zadjii-msft commented on GitHub (Jul 5, 2023): Hey, sorry for the delay. Yesterday was a holiday so it was a bit of an extra long weekend at the end of the vacation ☺️ Still trudging through a large pile of emails, but lemme see if I can't unblock you. From just skimming this thread, it looks like you've got the action set up to plumb into the `TermControl` / `ControlCore` layer. That's great! I think you might be a bit off track with the `OBSERVABLE_PROJECTED_SETTING` bit. Try looking at this instead: https://github.com/microsoft/terminal/blob/94e6b91c7892b9e2ec8244ab7990ecf50679b083/src/cascadia/TerminalControl/ControlCore.h#L234-L235 Those two are special - they're control properties that could be changable at runtime[^1]. There's already an action for setting Opacity at runtime[^2]. We were prepared though, and knew we wanted to do a similar thing with acrylic, so we pre-emptively made that a `RUNTIME_SETTING` so it could also be changed in a similar way. I'd start there. > PS: don't point to filenames If it needs to be stored there unless it would make me a great engineer like you maybe I am overthinking this. Do Engineers at Microsoft also get pointed to filenames??? We absofuckinglutely do, all the time. Dustin linked me a file path literally this morning. It's 1000x better to ask for help and quickly get pointed in the right direction, then spin your wheels for a couple days. There's literally no shame in admitting you don't know something, and asking for help. [^1]: I believe added in #11619 [^2]: added in #12092
Author
Owner

@Jaswir commented on GitHub (Jul 6, 2023):

@zadjii-msft

We were prepared though, and knew we wanted to do a similar thing with acrylic, so we pre-emptively made that a RUNTIME_SETTING so it could also be changed in a similar way. I'd start there.

Wait I am confused now. Thought the assignment of this issue was to make a toggle for opacity besides #12092 as mentioned by @moonunit9 .

Ability to quickly toggle opacity on/off through keystrokes. It would switch between 100% and custom setting in properties

The ones in #12092 are specific to 0,25,50,75. But no in-between. This one would switch to a custom value between 0 and 100 , like 58. Hence I was looking for a way to add a toggleOpacity property to the settings, besides BackgroundImageOpacity.

But the title of the issue is key binding to set or toggle acrylic. And from what you're saying, the goal is to make it toggle acrylic on and off instead? You want me to make something like this?

One sec, I'm working on a gif.

@Jaswir commented on GitHub (Jul 6, 2023): @zadjii-msft > We were prepared though, and knew we wanted to do a similar thing with acrylic, so we pre-emptively made that a `RUNTIME_SETTING` so it could also be changed in a similar way. I'd start there. Wait I am confused now. Thought the assignment of this issue was to make a toggle for opacity besides #12092 as mentioned by @moonunit9 . > Ability to quickly toggle opacity on/off through keystrokes. It would switch between 100% and custom setting in properties The ones in #12092 are specific to 0,25,50,75. But no in-between. This one would switch to a custom value between 0 and 100 , like 58. Hence I was looking for a way to add a toggleOpacity property to the settings, besides BackgroundImageOpacity. But the title of the issue is key binding to set or toggle acrylic. And from what you're saying, the goal is to make it toggle acrylic on and off instead? You want me to make something like this? One sec, I'm working on a gif.
Author
Owner

@Jaswir commented on GitHub (Jul 6, 2023):

Toggle_Acrylic

@zadjii-msft

Here is something I could get working in code.
Is this the idea? Toggling Acrylic?
If so, I don't know why _runtimeUseAcrylic = !_runtimeUseAcrylic doesn't work. Right now I only can do _runtimeUseAcrylic = true or _runtimeUseAcrylic = false, which does work.

Why doesn't _runtimeUseAcrylic = !_runtimeUseAcrylic work?

@Jaswir commented on GitHub (Jul 6, 2023): ![Toggle_Acrylic](https://github.com/microsoft/terminal/assets/15957528/0b0e065e-0543-4d6f-8237-bd2fc9ca09ae) @zadjii-msft Here is something I could get working in code. Is this the idea? Toggling Acrylic? If so, I don't know why` _runtimeUseAcrylic = !_runtimeUseAcrylic` doesn't work. Right now I only can do `_runtimeUseAcrylic = true` or `_runtimeUseAcrylic = false`, which does work. Why doesn't ` _runtimeUseAcrylic = !_runtimeUseAcrylic` work?
Author
Owner

@zadjii-msft commented on GitHub (Jul 12, 2023):

Wait I am confused now. Thought the assignment of this issue was to make a toggle for opacity besides

Oh, huh. Good observation. Seems like over the course of the history of this work item, we retitled it a bunch of times. That caused us to actually entirely lose the meaning of the original request... huh. Well now that's on us for being confusing.

I personally don't really feel great about a "Toggle opacity" action. My main concern is what opacity does it toggle to (from opaque)? Like, do we need to always just pick and opacity that the action goes to? That feels weird. Say we pick 30% as our arbitrary bound. Then a user could toggle from 50% -> 100% (off) -> 30%, which is probably not what they expected.

We could maybe do the action as "Toggle opacity, opacity:{}" and leave opacity as an argument. So something like:

{ "command": { "action": "toggleOpacity", "opacity": 30 } },

when you do that action, it'll either:

  • turn opacity off (=100%), if it's currently <100%
  • set opacity to 30% (if it's currently 100%)

But then, that precipitates the question of should this be a parameter to adjustOpacity - like,

{ "command": { "action": "adjustOpacity", "opacity": 30, "toggle": true } },

idk. I honestly just think the existing "Set opacity" actions cover the original scenario well enough...


I still think there's value in a toggleAcrylic action, which is really what I wanted from this thread (and was expecting from the title). What you've got in the above gif looks like basically what I was thinking of ☺️


Why doesn't _runtimeUseAcrylic = !_runtimeUseAcrylic work?

Ah, that's because _runtimeUseAcrylic is technically, secretly, a std::optional<bool>. So it starts as nullopt, and presumably optional::operator!(nullopt) -> nullopt.

@zadjii-msft commented on GitHub (Jul 12, 2023): > Wait I am confused now. Thought the assignment of this issue was to make a toggle for opacity besides Oh, huh. Good observation. Seems like over the course of the history of this work item, we retitled it a bunch of times. That caused us to actually entirely lose the meaning of the original request... huh. Well now that's on us for being confusing. I personally don't really feel great about a "Toggle opacity" action. My main concern is _what opacity does it toggle to (from opaque)?_ Like, do we need to always just pick and opacity that the action goes to? That feels weird. Say we pick 30% as our arbitrary bound. Then a user could toggle from 50% -> 100% (off) -> 30%, which is probably not what they expected. We could _maybe_ do the action as "Toggle opacity, opacity:{}" and leave `opacity` as an argument. So something like: ```json { "command": { "action": "toggleOpacity", "opacity": 30 } }, ``` when you do that action, it'll either: * turn opacity off (=100%), if it's currently <100% * set opacity to 30% (if it's currently 100%) But then, that precipitates the question of should this be a parameter to `adjustOpacity` - like, ```json { "command": { "action": "adjustOpacity", "opacity": 30, "toggle": true } }, ``` idk. I honestly just think the existing "Set opacity" actions cover the original scenario well enough... --- I still think there's value in a `toggleAcrylic` action, which is really what I wanted from this thread (and was expecting from the title). What you've got in the above gif looks like basically what I was thinking of ☺️ ---- > Why doesn't `_runtimeUseAcrylic = !_runtimeUseAcrylic` work? Ah, that's because `_runtimeUseAcrylic` is technically, secretly, a `std::optional<bool>`. So it starts as `nullopt`, and presumably `optional::operator!(nullopt) -> nullopt`.
Author
Owner

@Jaswir commented on GitHub (Jul 15, 2023):

@zadjii-msft

This is what I got now:
toggle acrylic v1

@Jaswir commented on GitHub (Jul 15, 2023): @zadjii-msft This is what I got now: ![toggle acrylic v1](https://github.com/microsoft/terminal/assets/15957528/6b725858-aade-455e-8be1-eb81872d503d)
Author
Owner

@Jaswir commented on GitHub (Jul 15, 2023):

@zadjii-msft

But it's kinda buggy, look what happens when I change opacity with mouse wheel:
buggy toggle acrylic

It's going out of Acrylic. Not sure why ScrollWheel Bug is happening. My guess is that because it's runtime Acrylic instead of the saved one in settings.json.

@Jaswir commented on GitHub (Jul 15, 2023): @zadjii-msft But it's kinda buggy, look what happens when I change opacity with mouse wheel: ![buggy toggle acrylic](https://github.com/microsoft/terminal/assets/15957528/1c5e834b-fec0-4eac-a75f-730576b62a88) It's going out of Acrylic. Not sure why ScrollWheel Bug is happening. My guess is that because it's runtime Acrylic instead of the saved one in settings.json.
Author
Owner

@Jaswir commented on GitHub (Jul 15, 2023):

@zadjii-msft
Yeah it's this line :
// Manually turn off acrylic if they turn off transparency.
_runtimeUseAcrylic = newOpacity < 1.0 && _settings->UseAcrylic();

From ControlCore::_setOpacity

When:

 "defaults": 
        {
            "useAcrylic": false
        },

The acrylic get's set to off everytime you change opacity with scrollwheel

runtime acrylic is set to off everytime opacity is changed when "useAcrylic": false in the settings.json
With the addition of Toggle Acrylic this makes no sense anymore hence It seems right to change it to
_runtimeUseAcrylic = newOpacity < 1.0;

Uhm I meant:

   // Manually turn off acrylic if they turn off transparency.
        if (newOpacity == 1.0)
        {
            _runtimeUseAcrylic = false;
        }
@Jaswir commented on GitHub (Jul 15, 2023): @zadjii-msft Yeah it's this line : ` // Manually turn off acrylic if they turn off transparency.` ` _runtimeUseAcrylic = newOpacity < 1.0 && _settings->UseAcrylic();` From `ControlCore::_setOpacity` When: ``` "defaults": { "useAcrylic": false }, ``` The acrylic get's set to off everytime you change opacity with scrollwheel runtime acrylic is set to off everytime opacity is changed when "useAcrylic": false in the settings.json With the addition of Toggle Acrylic this makes no sense anymore hence It seems right to change it to `_runtimeUseAcrylic = newOpacity < 1.0;` Uhm I meant: ``` // Manually turn off acrylic if they turn off transparency. if (newOpacity == 1.0) { _runtimeUseAcrylic = false; } ```
Author
Owner

@Jaswir commented on GitHub (Jul 15, 2023):

Only thing I do still wonder about.

Currently I use this:

        auto eventArgs = winrt::make_self<TransparencyChangedEventArgs>(0.0);
        _TransparencyChangedHandlers(*this, *eventArgs);

Inside ToggleAcrylic in ControlCore.cpp , I am thinking of making a new ChangedEventArgs for Acrylic , since I use an arbitrary value of 0.0 to get this working. Then again, intuitively I feel better about using existing code if it can be reused. Instead of adding new code.

@Jaswir commented on GitHub (Jul 15, 2023): Only thing I do still wonder about. Currently I use this: ``` auto eventArgs = winrt::make_self<TransparencyChangedEventArgs>(0.0); _TransparencyChangedHandlers(*this, *eventArgs); ``` Inside ToggleAcrylic in ControlCore.cpp , I am thinking of making a new ChangedEventArgs for Acrylic , since I use an arbitrary value of 0.0 to get this working. Then again, intuitively I feel better about using existing code if it can be reused. Instead of adding new code.
Author
Owner

@Jaswir commented on GitHub (Jul 15, 2023):

Anyway there's a PR

@Jaswir commented on GitHub (Jul 15, 2023): Anyway there's a PR
Author
Owner

@Jaswir commented on GitHub (Jul 24, 2023):

@zadjii-msft
As for the next issue.
This one seems like fun to me : https://github.com/microsoft/terminal/issues/11092
And you said this one first: 7158
So I guess this adventure pretty much. Assuming AbdullahAlmanei isn't working on it.

I thought doing this issue would be a good prep. And have been eyeballing those for a while to be honest.

But I would feel uncomfortable talking in the chat of 7158 cause lots of people. I was wondering if I can also email you or contact you somewhere more private, that would feel more comfortable. Do you respond similar to your email as in the chat here? Like here you respond quite fast. I saw your email somewhere, but can't find it anymore. What was it again? I guess mikegriese@microsoft.com ?

Btw I like to do issues that lots of people appreciate. In the past there was a period of my life where I made innovative web games. And mostly implemented the things most people asked for as they added most value. Here is something I made: https://www.kongregate.com/games/FeatherHatGames/toughgrowth?
ref=blog.kongregate.com
Or this when the other one doesn't work (haven't updated it with the webbrowser updates, but I think they update stuff themselves here to make it work)
https://armorgames.com/tough-growth-game/18348

However doing stuff like that with a team is new for me.

@Jaswir commented on GitHub (Jul 24, 2023): @zadjii-msft As for the next issue. This one seems like fun to me : https://github.com/microsoft/terminal/issues/11092 And you said this one first: 7158 So I guess this adventure pretty much. Assuming AbdullahAlmanei isn't working on it. I thought doing this issue would be a good prep. And have been eyeballing those for a while to be honest. But I would feel uncomfortable talking in the chat of 7158 cause lots of people. I was wondering if I can also email you or contact you somewhere more private, that would feel more comfortable. Do you respond similar to your email as in the chat here? Like here you respond quite fast. I saw your email somewhere, but can't find it anymore. What was it again? I guess [mikegriese@microsoft.com](mailto:mikegriese@microsoft.com) ? Btw I like to do issues that lots of people appreciate. In the past there was a period of my life where I made innovative web games. And mostly implemented the things most people asked for as they added most value. Here is something I made: https://www.kongregate.com/games/FeatherHatGames/toughgrowth? ref=blog.kongregate.com Or this when the other one doesn't work (haven't updated it with the webbrowser updates, but I think they update stuff themselves here to make it work) https://armorgames.com/tough-growth-game/18348 However doing stuff like that with a team is new for me.
Author
Owner

@Jaswir commented on GitHub (Jul 24, 2023):

@zadjii-msft

I started a bit on it and this is what I got.
start_plumbing

@Jaswir commented on GitHub (Jul 24, 2023): @zadjii-msft I started a bit on it and this is what I got. ![start_plumbing](https://github.com/microsoft/terminal/assets/15957528/3316d165-8c4a-4e4c-8801-4173f2fc4460)
Author
Owner

@Jaswir commented on GitHub (Jul 25, 2023):

@zadjii-msft

As in waiting for a more optimal comfortable place to talk with you. I guess I talk here for now..
Trying to get a clearer picture of what to make. Have a question.

  1. We want a boolean in defaults like this right?

image

  1. Also will the changes mentioned in the walkthrough in 7158
    Add something here? No right? That is done in a seperate Xaml file or no?

image

  1. I don't know why this tooltip doesn't change to "dragonpoop" or "experimental.enableUnfocusedAcrylic.showMarksOnScrollbar"

I looked for the tooltip text in the project and changed doc\cascadia\profiles.schema.json
image

As well as the text in this line X(bool, ShowMarks, "experimental.enableUnfocusedAcrylic.showMarksOnScrollbar", false)
in MTSMSettings.h Trying to make something happen in the settings file, but nothing happens.

@Jaswir commented on GitHub (Jul 25, 2023): @zadjii-msft As in waiting for a more optimal comfortable place to talk with you. I guess I talk here for now.. Trying to get a clearer picture of what to make. Have a question. 1. We want a boolean in defaults like this right? ![image](https://github.com/microsoft/terminal/assets/15957528/2411b46c-a22d-440b-9f5b-31d723a9b421) 2. Also will the changes mentioned in the walkthrough in 7158 Add something here? No right? That is done in a seperate Xaml file or no? ![image](https://github.com/microsoft/terminal/assets/15957528/109f2d10-9d2c-4f78-a1b2-4ac07150133d) 3. I don't know why this tooltip doesn't change to "dragonpoop" or "experimental.enableUnfocusedAcrylic.showMarksOnScrollbar" I looked for the tooltip text in the project and changed `doc\cascadia\profiles.schema.json` ![image](https://github.com/microsoft/terminal/assets/15957528/12f6cc23-a1b0-487e-bb82-3811ccd37ee0) As well as the text in this line X(bool, ShowMarks, "experimental.enableUnfocusedAcrylic.showMarksOnScrollbar", false) in `MTSMSettings.h` Trying to make something happen in the settings file, but nothing happens.
Author
Owner

@zadjii-msft commented on GitHub (Jul 25, 2023):

Hey sorry, lots of stuff to catch up on and I'm still quite distracted at the moment. Trying to get through a couple notes:

But I would feel uncomfortable talking in the chat of 7158 cause lots of people. I was wondering if I can also email you or contact you somewhere more private, that would feel more comfortable. Do you respond similar to your email as in the chat here?

That's totally reasonable - that's one of the most trafficked open issues at this point. Though, I'd probably stick to GitHub - my mail filters are notoriously aggressive and unreliable. Plus, I'm just better at keeping up to date on here anyways.

We want a boolean in defaults like this right?

Er, probably not in the profiles.defaults in the json itself. A hard-coded default is probably fine. I think those are in either MTSMSettings.h or TerminalSettings.h or ControlProperties.h... one of those. Might be all of them 😝

{{where do we put this in the XAML}}

I'd probably suggest... GlobalAppearance.xaml? since this would be a global appearance-related setting?

I actually think we may want to skip the XAML on this one for now. We've been having some discussions about compatibility settings, global settings, stuff like this, and it might be _more- confusing to have you do something here. We can always add it in post when we decide where to put it.

Schema changes aren't taking effect!

Oh jeez editing the schema is always a pain. You need to change

    "$schema": "https://aka.ms/terminal-profiles-schema",

at the top of your settings.json file to point at the profiles.schema.json on disk that you're making changes to, then reload VSCode. But I always forget the precise syntax for that and I'm away from the PC that has the right one. Something file://path-to-schema but again, I forget it exactly.

@zadjii-msft commented on GitHub (Jul 25, 2023): Hey sorry, lots of stuff to catch up on and I'm still quite distracted at the moment. Trying to get through a couple notes: > But I would feel uncomfortable talking in the chat of 7158 cause lots of people. I was wondering if I can also email you or contact you somewhere more private, that would feel more comfortable. Do you respond similar to your email as in the chat here? That's totally reasonable - that's one of the most trafficked open issues at this point. Though, I'd probably stick to GitHub - my mail filters are notoriously aggressive and unreliable. Plus, I'm just better at keeping up to date on here anyways. > We want a boolean in defaults like this right? Er, probably not in the `profiles.defaults` in the json itself. A hard-coded default is probably fine. I think those are in either `MTSMSettings.h` or `TerminalSettings.h` or `ControlProperties.h`... one of those. Might be all of them 😝 > {{where do we put this in the XAML}} I'd probably suggest... GlobalAppearance.xaml? since this would be a global appearance-related setting? I actually think we may want to skip the XAML on this one for now. We've been having some discussions about compatibility settings, global settings, stuff like this, and it might be _more- confusing to have you do something here. We can always add it in post when we decide where to put it. > Schema changes aren't taking effect! Oh jeez editing the schema is always a pain. You need to change ``` "$schema": "https://aka.ms/terminal-profiles-schema", ``` at the top of your `settings.json` file to point at the `profiles.schema.json` on disk that you're making changes to, then reload VSCode. But I always forget the precise syntax for that and I'm away from the PC that has the right one. Something `file://path-to-schema` but again, I forget it exactly.
Author
Owner

@Jaswir commented on GitHub (Jul 28, 2023):

at the top of your settings.json file to point at the profiles.schema.json on disk that you're making changes to, then reload VSCode. But I always forget the precise syntax for that and I'm away from the PC that has the right one. Something file://path-to-schema but again, I forget it exactly.

It's file:/// , thanks for the tip :)

@zadjii-msft
When would it suit you to review 2531?

@Jaswir commented on GitHub (Jul 28, 2023): > at the top of your `settings.json` file to point at the `profiles.schema.json` on disk that you're making changes to, then reload VSCode. But I always forget the precise syntax for that and I'm away from the PC that has the right one. Something `file://path-to-schema` but again, I forget it exactly. It's` file:///` , thanks for the tip :) @zadjii-msft When would it suit you to review 2531?
Author
Owner

@Jaswir commented on GitHub (Jul 28, 2023):

Er, probably not in the profiles.defaults in the json itself. A hard-coded default is probably fine. I think those are in either MTSMSettings.h or TerminalSettings.h or ControlProperties.h... one of those. Might be all of them 😝

Not in profiles I get that. I have it in the Globals now, so it works like this:
global_settings_boolean

I don't know what you mean with hard-coded default. What I understand the boolean value is set globally in settings.json like in the gif. The code part (MTSMSettings.h or TerminalSettings.h or ControlProperties.h) then connects to that and from there I can connect it to TermControl to either use in-app-acrylic or not.

For now it can be hard coded inside settings.json. But no representative yet in Xaml, so nothing will appear here:
image

As of yet.

Is that what you mean with hard-coded? (not appearing in the Xaml, but only in global settings)
Making sure I am implementing the right thing.
Still have to connect the code to the settings.json though, but this is what I got now.

@Jaswir commented on GitHub (Jul 28, 2023): > Er, probably not in the `profiles.defaults` in the json itself. A hard-coded default is probably fine. I think those are in either `MTSMSettings.h` or `TerminalSettings.h` or `ControlProperties.h`... one of those. Might be all of them 😝 Not in profiles I get that. I have it in the Globals now, so it works like this: ![global_settings_boolean](https://github.com/microsoft/terminal/assets/15957528/ae431615-522d-4e4f-b947-3ab25201ff77) I don't know what you mean with hard-coded default. What I understand the boolean value is set globally in settings.json like in the gif. The code part (MTSMSettings.h or TerminalSettings.h or ControlProperties.h) then connects to that and from there I can connect it to TermControl to either use in-app-acrylic or not. For now it can be hard coded inside settings.json. But no representative yet in Xaml, so nothing will appear here: ![image](https://github.com/microsoft/terminal/assets/15957528/ca632e90-f8bd-434a-8159-99da78cd5331) As of yet. Is that what you mean with hard-coded? (not appearing in the Xaml, but only in global settings) Making sure I am implementing the right thing. Still have to connect the code to the settings.json though, but this is what I got now.
Author
Owner

@Jaswir commented on GitHub (Jul 28, 2023):

Hmm, would expect that there would be some kind of list outside of settings.json that checks whether jsonKey's entered at MTSMSettings.h are valid. The valid properties would be stores in this list, or maybe double check with the profiles.schema.json either on disk or here: https://aka.ms/terminal-profiles-schema".

And this check thing might be called controlproperties at it controls whether properties exist.

@Jaswir commented on GitHub (Jul 28, 2023): Hmm, would expect that there would be some kind of list outside of settings.json that checks whether jsonKey's entered at `MTSMSettings.h` are valid. The valid properties would be stores in this list, or maybe double check with the profiles.schema.json either on disk or here: https://aka.ms/terminal-profiles-schema". And this check thing might be called controlproperties at it controls whether properties exist.
Author
Owner

@Jaswir commented on GitHub (Jul 28, 2023):

@zadjii-msft

Hey Mike!
Look what I got! Did some plumbing and this is what I got so far:
plumbing_global_done_maybe_share_92

However I am kinda confused, probably missing something.
image

I don't know what moving the acrylic from CONTROL_SETTINGS to CONTROL_APPEARANCE_SETTINGS is for. And also yeah moving it in profile settings.

What is it for?

Also this one:
image

I don't get, what global setting are you talking about? Is CONTROL_APPEARANCE_SETTINGS Global variant of CONTROL SETTINGS? Are you talking about using the enableUnfocusedAcryl there? I currently added _EnableUnfocusedAcrylic = globalSettings.EnableUnfocusedAcrylic(); to _ApplyGlobalSettings with the other global settings

@Jaswir commented on GitHub (Jul 28, 2023): @zadjii-msft Hey Mike! Look what I got! Did some plumbing and this is what I got so far: ![plumbing_global_done_maybe_share_92](https://github.com/microsoft/terminal/assets/15957528/8d664f48-fb7b-4e5d-9bf5-bd449afc2fe2) However I am kinda confused, probably missing something. ![image](https://github.com/microsoft/terminal/assets/15957528/fcdb8c54-e8f1-4105-8222-a8ae0f5a222c) I don't know what moving the acrylic from `CONTROL_SETTINGS `to `CONTROL_APPEARANCE_SETTINGS` is for. And also yeah moving it in profile settings. What is it for? Also this one: ![image](https://github.com/microsoft/terminal/assets/15957528/ca1b5e7a-8a8c-4d34-9b25-08fc3982eb4c) I don't get, what global setting are you talking about? Is CONTROL_APPEARANCE_SETTINGS Global variant of CONTROL SETTINGS? Are you talking about using the enableUnfocusedAcryl there? I currently added `_EnableUnfocusedAcrylic = globalSettings.EnableUnfocusedAcrylic();` to _ApplyGlobalSettings with the other global settings
Author
Owner

@zadjii-msft commented on GitHub (Aug 1, 2023):

Sorry for any confusion! This is probably a side-effect of #11092 and #7158 evolving organically in parallel, instead of me consolidating everything into one thread.

I don't know what moving the acrylic from CONTROL_SETTINGS to CONTROL_APPEARANCE_SETTINGS is for. And also yeah moving it in profile settings

Ah, that is ultimately the crux of the feature here! The TermControl can have different sets of "appearance" settings, based on if the control is focused or not. Acrylic was never a part of the "appearance" settings before, because it couldn't be applied when unfocused. Now it can! So it should get moved there. I think opacity looks like it is, at least in IControlAppearance.

I think these docs might make more sense.

So basically, there's one new setting, and one moved setting:

  • moved useAcrylic, which is moved to being a control/profile per-appearance setting
  • new A global enableUnfocusedAcrylic which toggles if we should even enable the unfocused acrylic. That'll basically just get &&-ed in TerminalSettings::_ApplyAppearanceSettings with the unfocused appearance's useAcrylic, so that if enableUnfocusedAcrylic is disabled, we don't use the new behavior.
@zadjii-msft commented on GitHub (Aug 1, 2023): Sorry for any confusion! This is probably a side-effect of #11092 and #7158 evolving organically in parallel, instead of me consolidating everything into one thread. > I don't know what moving the acrylic from `CONTROL_SETTINGS `to `CONTROL_APPEARANCE_SETTINGS` is for. And also yeah moving it in profile settings Ah, that is ultimately the crux of the feature here! The `TermControl` can have different sets of "appearance" settings, based on if the control is focused or not. Acrylic was never a part of the "appearance" settings before, because it _couldn't_ be applied when unfocused. Now it can! So it should get moved there. I _think_ opacity looks like it is, at least in IControlAppearance. I think [these docs](https://learn.microsoft.com/en-us/windows/terminal/customize-settings/profile-appearance#unfocused-appearance-settings) might make more sense. So basically, there's one _new_ setting, and one _moved_ setting: * **moved** `useAcrylic`, which is moved to being a control/profile per-appearance setting * **new** A global `enableUnfocusedAcrylic` which toggles if we should even enable the unfocused acrylic. That'll basically just get `&&`-ed in `TerminalSettings::_ApplyAppearanceSettings` with the unfocused appearance's `useAcrylic`, so that if `enableUnfocusedAcrylic` is disabled, we don't use the new behavior.
Author
Owner

@Jaswir commented on GitHub (Aug 4, 2023):

@zadjii-msft

Ah I think I get it, in order to use acrylic in unfocused appearance settings , useAcrylic needs to be moved to CONTROL_APPEARANCE_SETTINGS.

That's what you mean right?

Also last time I checked Opacity was also missing from Unfocused Appearance,
see: https://github.com/microsoft/terminal/issues/11092#issuecomment-1557024462

Btw how do you want me to deliver these PR's to you? Since there are 2 issues 7158 and 11092

I figure 11092 is basically about https://github.com/microsoft/terminal/issues/11092#issuecomment-1557024462
enabling opacity as both an appearance setting, allowing it to be set differently in both focused and unfocused terminals.

And 7158 global useAcrylic, and allowing it to be set differently in both focused and unfocused terminals?

Or 7158 could be just the global useAcrylic boolean. And 11092 about , allowing Acrylic and Opacity be set differently in both focused and unfocused terminals. At least that's how I interpreted 11092.

@Jaswir commented on GitHub (Aug 4, 2023): @zadjii-msft Ah I think I get it, in order to use acrylic in unfocused appearance settings , useAcrylic needs to be moved to CONTROL_APPEARANCE_SETTINGS. That's what you mean right? Also last time I checked Opacity was also missing from Unfocused Appearance, see: https://github.com/microsoft/terminal/issues/11092#issuecomment-1557024462 Btw how do you want me to deliver these PR's to you? Since there are 2 issues 7158 and 11092 I figure 11092 is basically about https://github.com/microsoft/terminal/issues/11092#issuecomment-1557024462 enabling opacity as both an appearance setting, allowing it to be set differently in both focused and unfocused terminals. And 7158 global useAcrylic, and allowing it to be set differently in both focused and unfocused terminals? Or 7158 could be just the global useAcrylic boolean. And 11092 about , allowing Acrylic and Opacity be set differently in both focused and unfocused terminals. At least that's how I interpreted 11092.
Author
Owner

@Jaswir commented on GitHub (Aug 5, 2023):

@zadjii-msft

I don't know where the RetroTerminalEffect is changed when the terminal becomes unfocused or focused help.
I looked at ProfileViewModel, but breakpoints couldn't be triggered there or something?

image

And ControlCore.cpp -> ColorScheme breakpoint doesn't get hit which I expected it would activate when focus changed

TermControl::_LostFocusHandler is the closest thing I found

I've set up UseAcrylic2 with ControlAppearances.idl, CONTROL_APPEARANCE_SETTINGS and ControlCore and basically got that part of the application working with UseAcrylic2, I demolished ControlCore., ControlProps, ControlSettings.Idl, TerminalSettings.h that part out which use UseAcrylic and that part seems to be working now of the App with the UseAcrylic2 pipes in plumbing terms (UseAcrylic2 is connected to "useAcrylic" json key) . Only have to get the ProfileViewModel Part working which I believe is basically this:
image
part I think.

and that'll be the plumbing done I think

When demolishing ProfileViewModel things I bump to some issues that I am working on. I'll ask question if I get stuck.

@Jaswir commented on GitHub (Aug 5, 2023): @zadjii-msft I don't know where the RetroTerminalEffect is changed when the terminal becomes unfocused or focused help. I looked at ProfileViewModel, but breakpoints couldn't be triggered there or something? ![image](https://github.com/microsoft/terminal/assets/15957528/8b16850f-c050-4f7b-aca0-b8e56fcbe855) And ControlCore.cpp -> ColorScheme breakpoint doesn't get hit which I expected it would activate when focus changed TermControl::_LostFocusHandler is the closest thing I found I've set up UseAcrylic2 with ControlAppearances.idl, CONTROL_APPEARANCE_SETTINGS and ControlCore and basically got that part of the application working with `UseAcrylic2`, I demolished ControlCore., ControlProps, ControlSettings.Idl, TerminalSettings.h that part out which use` UseAcrylic` and that part seems to be working now of the App with the UseAcrylic2 pipes in plumbing terms (UseAcrylic2 is connected to "useAcrylic" json key) . Only have to get the ProfileViewModel Part working which I believe is basically this: ![image](https://github.com/microsoft/terminal/assets/15957528/eda4eb4f-994b-410a-90fc-4a193cce47ac) part I think. and that'll be the plumbing done I think When demolishing ProfileViewModel things I bump to some issues that I am working on. I'll ask question if I get stuck.
Author
Owner

@zadjii-msft commented on GitHub (Aug 7, 2023):

Alrighty so a lot of points here, I'll surely miss something:

  • I think the appearance settings get re-applied in TermControl::UpdateAppearance (which calls through to _ApplyUISettings). Ultimately, the most interesting one is TermControl::_InitializeBackgroundBrush, which sets up the background brush (which is what we care about here).
  • This calls to _core.Opacity, to retrieve the runtime Opacity value. Now, that's implemented in the core as being
    RUNTIME_SETTING(double, Opacity, _settings->Opacity());
    
    Effectively, "If the user changed this, return the runtime value, but otherwise use _settings->Opacity() for this value".
  • That's where we get tricky with even more macros. There's this big blob in ControlSettings:
    c6e5f79115/src/cascadia/TerminalControl/ControlSettings.h (L56-L76)
    That means that when we call _settings->Opacity(), we're always returning the focused appearance's value!
  • Oh dear this might be a good amount more complicated. Oh dear.

Okay this might not be an easy starter issue at all. Now we've got this awkward interaction between the runtime changing of opacity, and whether or not the focused or unfocused appearance is applied. RUNTIME_SETTING doesn't really work with that idea so well.

We probably need to also make changes so that:

  • mouse wheeling / setting opacity changes the runtime value relative to the focused appearance.
  • Changing to the unfocused appearance then back to the focused one would end up returning the runtime set value, rather than the one straight from the settings

Or maybe it could be changed to

RUNTIME_SETTING(double, FocusedOpacity, FocusedAppearance().Opacity());
RUNTIME_SETTING(double, UnfocusedOpacity, UnfocusedAppearance().Opacity());

and then choose the right value accordingly in TermControl::_InitializeBackgroundBrush.

@zadjii-msft commented on GitHub (Aug 7, 2023): Alrighty so a lot of points here, I'll surely miss something: * I think the appearance settings get re-applied in `TermControl::UpdateAppearance` (which calls through to `_ApplyUISettings`). Ultimately, the most interesting one is `TermControl::_InitializeBackgroundBrush`, which sets up the background brush (which is what we care about here). * This calls to `_core.Opacity`, to retrieve the _runtime_ `Opacity` value. Now, that's implemented in the core as being ```c++ RUNTIME_SETTING(double, Opacity, _settings->Opacity()); ``` Effectively, "If the user changed this, return the runtime value, but otherwise use `_settings->Opacity()` for this value". * That's where we get tricky with _even more macros_. There's this big blob in ControlSettings: https://github.com/microsoft/terminal/blob/c6e5f791152f0591cb617518fe1c9e3c15a6c721/src/cascadia/TerminalControl/ControlSettings.h#L56-L76 That means that when we call `_settings->Opacity()`, we're always returning the focused appearance's value! * Oh dear this might be a good amount more complicated. Oh dear. Okay this might not be an easy starter issue at all. Now we've got this awkward interaction between the runtime changing of opacity, and whether or not the focused or unfocused appearance is applied. `RUNTIME_SETTING` doesn't really work with that idea so well. We probably need to also make changes so that: * mouse wheeling / setting opacity changes the runtime value relative to the _focused_ appearance. * Changing to the unfocused appearance then back to the focused one would end up returning the runtime set value, rather than the one straight from the settings Or maybe it could be changed to ```c++ RUNTIME_SETTING(double, FocusedOpacity, FocusedAppearance().Opacity()); RUNTIME_SETTING(double, UnfocusedOpacity, UnfocusedAppearance().Opacity()); ``` and then choose the right value accordingly in `TermControl::_InitializeBackgroundBrush`.
Author
Owner

@Jaswir commented on GitHub (Aug 7, 2023):

@zadjii-msft

Just wanted to mention before I go to sleep late, that the plumbing is going well! have to make some switches and it should be good.

@Jaswir commented on GitHub (Aug 7, 2023): @zadjii-msft Just wanted to mention before I go to sleep late, that the plumbing is going well! have to make some switches and it should be good.
Author
Owner

@Jaswir commented on GitHub (Aug 8, 2023):

@zadjii-msft

Okay this might not be an easy starter issue at all

I like a challenge 😁

@Jaswir commented on GitHub (Aug 8, 2023): @zadjii-msft > Okay this might not be an easy starter issue at all I like a challenge 😁
Author
Owner

@Jaswir commented on GitHub (Aug 10, 2023):

@zadjii-msft

I think I might be missing something in the plumbing.
So I am switching UseAcrylic2 that is configured to work as ControlAppearance to UseAcrylic. And there's 1 file that I am adding something manually to, which makes it work, but I am not sure this is how it's supposed to be done.
Maybe I am missing some .idl here. I got IControlAppearance.idl and IAppearanceConfig.idl

The file in question is ControlSettings.h

I am talking about manually adding this piece of code to:
CONTROL_APPEARANCE_SETTINGS(APPEARANCE_GEN)

      bool UseAcrylic() const noexcept
       {
           return _focusedAppearance->UseAcrylic();
       }
       void UseAcrylic(const bool& value) noexcept
       {
           _focusedAppearance->UseAcrylic(value);
       }

Is it supposed to be added in manually like this or am I missing something? I am coding quite a lot on my intuition.

I'd suspect that the CONTROL_APPEARANCE_SETTINGS(X) inside ControlProperties.h would impact ControlSettings.h somehow since the Macro says:

CONTROL_APPEARANCE_SETTINGS(APPEARANCE_GEN)

and

#define APPEARANCE_GEN(type, name, ...)    \
    type name() const noexcept             \
    {                                      \
        return _focusedAppearance->name(); \
    }                                      \
    void name(const type& value) noexcept  \
    {                                      \
        _focusedAppearance->name(value);   \
    }

So it would automatically add it inside ControlSettings.h, once added to the macro in ControlProperties.h . But when I remove it from ControlSeting.h, clean and rebuild it doesn't reappear in ControlSettings.h

@Jaswir commented on GitHub (Aug 10, 2023): @zadjii-msft I think I might be missing something in the plumbing. So I am switching UseAcrylic2 that is configured to work as ControlAppearance to UseAcrylic. And there's 1 file that I am adding something manually to, which makes it work, but I am not sure this is how it's supposed to be done. Maybe I am missing some .idl here. I got` IControlAppearance.idl` and `IAppearanceConfig.idl` The file in question is `ControlSettings.h` I am talking about manually adding this piece of code to: `CONTROL_APPEARANCE_SETTINGS(APPEARANCE_GEN) ` ``` bool UseAcrylic() const noexcept { return _focusedAppearance->UseAcrylic(); } void UseAcrylic(const bool& value) noexcept { _focusedAppearance->UseAcrylic(value); } ``` Is it supposed to be added in manually like this or am I missing something? I am coding quite a lot on my intuition. I'd suspect that the `CONTROL_APPEARANCE_SETTINGS(X) ` inside` ControlProperties.h` would impact ControlSettings.h somehow since the Macro says: CONTROL_APPEARANCE_SETTINGS(APPEARANCE_GEN) and ``` #define APPEARANCE_GEN(type, name, ...) \ type name() const noexcept \ { \ return _focusedAppearance->name(); \ } \ void name(const type& value) noexcept \ { \ _focusedAppearance->name(value); \ } ``` So it would automatically add it inside ControlSettings.h, once added to the macro in ControlProperties.h . But when I remove it from ControlSeting.h, clean and rebuild it doesn't reappear in ControlSettings.h
Author
Owner

@zadjii-msft commented on GitHub (Aug 10, 2023):

FWIW I don't think you need to touch ControlSettings.h. That file is full of macros that automatically build up the ControlSettings class at compile time based on the contents of ControlProperties.h. Just sticking the property into CONTROL_APPEARANCE_SETTINGS and IControlAppearance.idl should be enough for it to populate into the _focusedAppearance/_unfocusedAppearance objects

@zadjii-msft commented on GitHub (Aug 10, 2023): FWIW I don't think you need to touch `ControlSettings.h`. That file is full of macros that automatically build up the `ControlSettings` class at compile time based on the contents of `ControlProperties.h`. Just sticking the property into `CONTROL_APPEARANCE_SETTINGS` and `IControlAppearance.idl` should be enough for it to populate into the `_focusedAppearance`/`_unfocusedAppearance` objects
Author
Owner

@Jaswir commented on GitHub (Aug 10, 2023):

FWIW I don't think you need to touch ControlSettings.h. That file is full of macros that automatically build up the ControlSettings class at compile time based on the contents of ControlProperties.h. Just sticking the property into CONTROL_APPEARANCE_SETTINGS and IControlAppearance.idl should be enough for it to populate into the _focusedAppearance/_unfocusedAppearance objects

I don't know why it isn't working, help. When you add something new to CONTROL_APPEARANCE_SETTINGS in ControlProperties.h and IControlAppearance.idl , does something automatically appear in the ControlSettings.h for you?
It doesn't for me.

@Jaswir commented on GitHub (Aug 10, 2023): > FWIW I don't think you need to touch `ControlSettings.h`. That file is full of macros that automatically build up the `ControlSettings` class at compile time based on the contents of `ControlProperties.h`. Just sticking the property into `CONTROL_APPEARANCE_SETTINGS` and `IControlAppearance.idl` should be enough for it to populate into the `_focusedAppearance`/`_unfocusedAppearance` objects I don't know why it isn't working, help. When you add something new to `CONTROL_APPEARANCE_SETTINGS` in `ControlProperties.h` and `IControlAppearance.idl` , does something automatically appear in the ControlSettings.h for you? It doesn't for me.
Author
Owner

@zadjii-msft commented on GitHub (Aug 10, 2023):

does something automatically appear in the ControlSettings.h for you

Nope. That file is all just C macros. Nothing about that file changes, but when the compiler actually evaluates that file, it's gonna macro expand everything in there, combined with the macros in ControlProperties.h, to generate definitions for everything automatically.

It's a pretty heavy use of X macros, which are some crazy C concept that I only learned about a few years ago. It's great for boilerplate code like this.

@zadjii-msft commented on GitHub (Aug 10, 2023): > does something automatically appear in the ControlSettings.h for you Nope. That file is all just C macros. Nothing about that file changes, but when the compiler actually evaluates that file, it's gonna macro expand everything in there, combined with the macros in `ControlProperties.h`, to generate definitions for everything automatically. It's a pretty heavy use of [X macros](https://en.wikipedia.org/wiki/X_macro), which are some crazy C concept that I only learned about a few years ago. It's great for boilerplate code like this.
Author
Owner

@Jaswir commented on GitHub (Aug 10, 2023):

@zadjii-msft

Got the plumbing done and working now AFAIK! Ofcourse, you'll only see it working when I apply THAT functionality and send a gif of that :D

Not sure what the difference is between Macro's and XMacros but ,
I think Macros are pretty cool, have only seen it in c++ so far, which surprises me its really awesome for lazy people like me.
I think I solved the Controlsettings.h issue, I had to manually rewrite the macro as CONTROL_APPEARANCE_SETTINGS(APPEARANCE_GEN)
and then it worked probably at some point I opened it (expanded inline to see what is inside it) edited something and then saved and commited that and forgot and the compiler thing wouldn't happen anymore.

@Jaswir commented on GitHub (Aug 10, 2023): @zadjii-msft Got the plumbing done and working now AFAIK! Ofcourse, you'll only see it working when I apply `THAT `functionality and send a gif of that :D Not sure what the difference is between Macro's and XMacros but , I think Macros are pretty cool, have only seen it in c++ so far, which surprises me its really awesome for lazy people like me. I think I solved the Controlsettings.h issue, I had to manually rewrite the macro as CONTROL_APPEARANCE_SETTINGS(APPEARANCE_GEN) and then it worked probably at some point I opened it (expanded inline to see what is inside it) edited something and then saved and commited that and forgot and the compiler thing wouldn't happen anymore.
Author
Owner

@Jaswir commented on GitHub (Aug 10, 2023):

  • Ultimately, the most interesting one is TermControl::_InitializeBackgroundBrush, which sets up the background brush (which is what we care about here).

_Initialize only get's called upon initialization, but we want to fire some function everytime the focus state is changed.
See gif, everytime I click on the folder and back to terminal:
run_code_focus_switch

And update the acrylic and opacity everytime it's changed. I thought if I find the place where RetroTerminalEffect gets updated I can just add that code for acrylic and opacity to that location. But couldn't find it.
Is that somewhere deep inside _UpdateAppearanceFromUIThread?

Feel confident about implementing the other thing you mentioned with

RUNTIME_SETTING(double, FocusedOpacity, FocusedAppearance().Opacity());
RUNTIME_SETTING(double, UnfocusedOpacity, UnfocusedAppearance().Opacity());


After plumbing ControlCore

I guess I can get just get the code working at some inappropriate place for now

@Jaswir commented on GitHub (Aug 10, 2023): > * Ultimately, the most interesting one is `TermControl::_InitializeBackgroundBrush`, which sets up the background brush (which is what we care about here). _Initialize only get's called upon initialization, but we want to fire some function everytime the focus state is changed. See gif, everytime I click on the folder and back to terminal: ![run_code_focus_switch](https://github.com/microsoft/terminal/assets/15957528/5e6a21c1-4e4e-4a87-8555-45eedcb23246) And update the acrylic and opacity everytime it's changed. I thought if I find the place where RetroTerminalEffect gets updated I can just add that code for acrylic and opacity to that location. But couldn't find it. Is that somewhere deep inside `_UpdateAppearanceFromUIThread`? Feel confident about implementing the other thing you mentioned with ``` RUNTIME_SETTING(double, FocusedOpacity, FocusedAppearance().Opacity()); RUNTIME_SETTING(double, UnfocusedOpacity, UnfocusedAppearance().Opacity()); ``` After plumbing ControlCore I guess I can get just get the code working at some inappropriate place for now
Author
Owner

@Jaswir commented on GitHub (Aug 10, 2023):

  • I think the appearance settings get re-applied in TermControl::UpdateAppearance (which calls through to _ApplyUISettings). Ultimately, the most interesting one is TermControl::_InitializeBackgroundBrush, which sets up the background brush (which is what we care about here).

I checked it. And the TermControl::UpdateAppearance gets fired continuously it seems, but it doesn't call through to _ApplyUISettings

@Jaswir commented on GitHub (Aug 10, 2023): > * I think the appearance settings get re-applied in `TermControl::UpdateAppearance` (which calls through to `_ApplyUISettings`). Ultimately, the most interesting one is `TermControl::_InitializeBackgroundBrush`, which sets up the background brush (which is what we care about here). I checked it. And the `TermControl::UpdateAppearance` gets fired continuously it seems, but it doesn't call through to _ApplyUISettings
Author
Owner

@Jaswir commented on GitHub (Aug 10, 2023):

The Toggle Acrylic function from 2531 would probably be useful here aswell

@Jaswir commented on GitHub (Aug 10, 2023): The `Toggle Acrylic` function from 2531 would probably be useful here aswell
Author
Owner

@Jaswir commented on GitHub (Aug 10, 2023):

Played around a bit:

Acrylic unfocused more transparent:

unfocused_more_transparent

Opacity unfocused more transparent (my current favorite)
opacity_jaswir_style

Cool stuff (you know this one might become my favorite actually)
cool_stuff

D: Why the hell not. Fully transparent when focused, "fully transparent acrylic" when unfocused.
D_mike_whythehellnot

@zadjii-msft I could post this in the future in 7158 and then include A,B,C,D that would complement your permutation comment nicely could be a good teamwork move. Let me know, what do you think about that?

The code is really ugly though ;)

@Jaswir commented on GitHub (Aug 10, 2023): Played around a bit: Acrylic unfocused more transparent: ![unfocused_more_transparent](https://github.com/microsoft/terminal/assets/15957528/214048b0-6fcd-4580-9599-3e21a81f4ab7) Opacity unfocused more transparent (my current favorite) ![opacity_jaswir_style](https://github.com/microsoft/terminal/assets/15957528/eacee2fa-d00c-4b9b-9b7c-744e1571d632) Cool stuff (you know this one might become my favorite actually) ![cool_stuff](https://github.com/microsoft/terminal/assets/15957528/43d551c9-6ee1-40f4-b188-5f60b72048d7) **D:** Why the hell not. Fully transparent when focused, "fully transparent acrylic" when unfocused. ![D_mike_whythehellnot](https://github.com/microsoft/terminal/assets/15957528/647a1cb9-6d0e-4647-b541-0aea2585c63a) @zadjii-msft I could post this in the future in 7158 and then include A,B,C,D that would complement your permutation comment nicely could be a good teamwork move. Let me know, what do you think about that? The code is really ugly though ;)
Author
Owner

@Jaswir commented on GitHub (Aug 21, 2023):

@zadjii-msft

Questions:

  1. I could post some gifs fitting your A,B,C,D example that would complement your permutation comment nicely could be a good teamwork move. Let me know, what do you think about that?

  2. So what's the idea about the PR's for 7158 and 11092? I am getting close to PR's it's big and complicated, splitting it up makes things easier for me and for you as well.

I understand 11092 will be:
image

Just Opacity right?

And then 7158 about enabling Acrylic as both an appearance setting (with all the plumbing), allowing it to be set differently in both focused and unfocused terminals plus the EnableUnfocusedAcrylic Global Setting right?

  1. What are 👶 OOF Fridays? Does it mean you are free fridays now because off the baby and stuff? Or Only on Friday, you only work on fridays now??
@Jaswir commented on GitHub (Aug 21, 2023): @zadjii-msft Questions: 1. I could post some gifs fitting your A,B,C,D example that would complement your permutation comment nicely could be a good teamwork move. Let me know, what do you think about that? 2. So what's the idea about the PR's for 7158 and 11092? I am getting close to PR's it's big and complicated, splitting it up makes things easier for me and for you as well. I understand 11092 will be: ![image](https://github.com/microsoft/terminal/assets/15957528/5e3f1a68-9ae9-425e-abbf-897d70fd251a) Just Opacity right? And then 7158 about enabling Acrylic as both an appearance setting (with all the plumbing), allowing it to be set differently in both focused and unfocused terminals plus the EnableUnfocusedAcrylic Global Setting right? 3. What are 👶 OOF Fridays? Does it mean you are free fridays now because off the baby and stuff? Or Only on Friday, you only work on fridays now??
Author
Owner

@zadjii-msft commented on GitHub (Aug 23, 2023):

  1. Great, go for it (as you already did 😝). It's your contribution, feel free to demo it however you feel is good.
  2. Meh, if it's easier, just do it all as one PR. It can't be as big as the last three PRs I've reviewed 😅 If it's easier to break it up, then do it that way. I don't really mind one way or the other.
  3. "OOF" is apparently a Microsoft-ism that means "out of office"1 . Basically, I'm still taking a bunch of Fridays off to burn my last paternity leave days (rather than just take the last two weeks in a single chunk). A little easier for my family this way 😄

  1. and I was today years old when I realized that OOF is not the abbreviation of "Out Of Office". I've literally never thought of it for the last 8 years I've been here. ↩︎

@zadjii-msft commented on GitHub (Aug 23, 2023): 1. Great, go for it (as you already did 😝). It's your contribution, feel free to demo it however you feel is good. 2. Meh, if it's easier, just do it all as one PR. It can't be as big as the last three PRs I've reviewed 😅 If it's easier to break it up, then do it that way. I don't really mind one way or the other. 3. "OOF" is apparently a [Microsoft-ism](https://techcommunity.microsoft.com/t5/exchange-team-blog/why-is-oof-an-oof-and-not-an-ooo/ba-p/610191) that means "out of office"[^1]. Basically, I'm still taking a bunch of Fridays off to burn my last paternity leave days (rather than just take the last two weeks in a single chunk). A little easier for my family this way 😄 [^1]: and I was today years old when I realized that OOF is _not_ the abbreviation of "Out Of Office". I've literally never thought of it for the last 8 years I've been here.
Author
Owner

@Jaswir commented on GitHub (Sep 2, 2023):

@zadjii-msft

Questions:

  1. Made A PR for 7158, spend some extra time on writing the description of the PR, making the description quite extensive.
    I heard somewhere good Engineers spend more time on submitting code for review resulting in less iterations of reviewing and improving the code.

image
https://www.youtube.com/watch?v=ZaZj7XJMJv0

Could you provide me feedback please if you think this added value to my PR in your opinion? Would like to improve become a Great Engineer. Thanks in advance.

  1. Opacity defaults to 50 when UseAcrylic is true???
    image
    It doesn't seem to default to 50 to me?
    image
@Jaswir commented on GitHub (Sep 2, 2023): @zadjii-msft **Questions:** 1. Made A PR for 7158, spend some extra time on writing the description of the PR, making the description quite extensive. I heard somewhere good Engineers spend more time on submitting code for review resulting in less iterations of reviewing and improving the code. ![image](https://github.com/microsoft/terminal/assets/15957528/0bdb82ab-3e27-4076-91a3-635bebe01169) https://www.youtube.com/watch?v=ZaZj7XJMJv0 Could you provide me feedback please if you think this added value to my PR in your opinion? Would like to improve become a Great Engineer. Thanks in advance. 2. Opacity defaults to 50 when UseAcrylic is true??? ![image](https://github.com/microsoft/terminal/assets/15957528/644a6de8-bbe8-4713-9600-a524729f2abe) It doesn't seem to default to 50 to me? ![image](https://github.com/microsoft/terminal/assets/15957528/7c825206-19ac-4086-9711-02716386a460)
Author
Owner

@Jaswir commented on GitHub (Sep 7, 2023):

@zadjii-msft
I notice that acrylic.BackgroundSource(Media::AcrylicBackgroundSource::Backdrop); is different from
acrylic.BackgroundSource(Media::AcrylicBackgroundSource::HostBackdrop);

Not sure if it's a problem, seems to be the default behaviour of Backdrop, there's a see through at the edge where it's somewhat transparent instead of acrylic.
image

and it seems a nit bit less bright, can you spot it? Both are at 0 Opacity btw
image

image

@Jaswir commented on GitHub (Sep 7, 2023): @zadjii-msft I notice that `acrylic.BackgroundSource(Media::AcrylicBackgroundSource::Backdrop);` is different from ` acrylic.BackgroundSource(Media::AcrylicBackgroundSource::HostBackdrop);` Not sure if it's a problem, seems to be the default behaviour of Backdrop, there's a see through at the edge where it's somewhat transparent instead of acrylic. ![image](https://github.com/microsoft/terminal/assets/15957528/4f2c7a41-7b2e-42d8-be96-a930ff1f4f1c) and it seems a nit bit less bright, can you spot it? Both are at `0` Opacity btw ![image](https://github.com/microsoft/terminal/assets/15957528/446ffb57-3599-4126-bef4-5abf8a8a8d58) ![image](https://github.com/microsoft/terminal/assets/15957528/45f11ae0-9ceb-4fab-8c7f-a9aac5f9b79b)
Author
Owner

@zadjii-msft commented on GitHub (Sep 7, 2023):

Oh, I'm sure that's fine. In-app acrylic (Backdrop) was never really meant to be used with a transparent window background. That's a happy side effect of us being able to drop out our window background (which most UWPs can't). We're firmly in unexplored territory of the app platform 😄

@zadjii-msft commented on GitHub (Sep 7, 2023): Oh, I'm sure that's fine. In-app acrylic (`Backdrop`) was never _really_ meant to be used with a transparent window background. That's a happy side effect of us being able to drop out our window background (which most UWPs can't). We're firmly in unexplored territory of the app platform 😄
Author
Owner

@Jaswir commented on GitHub (Sep 7, 2023):

@zadjii-msft I don't know how I can check whether the command palette is open? Help

I want to _setOpacity(newAppearance->Opacity()); in ControlCore::ApplyAppearance so the opacity changes according to unfocused opacity and focused opacity.

But as you can see below the windows becomes unfocused when opening the command palette and focused when closing it so then the adjust opacity's _setOpacity gets overridden by the one in ControlCore::ApplyAppearance

check_command_pallette

@Jaswir commented on GitHub (Sep 7, 2023): @zadjii-msft I don't know how I can check whether the command palette is open? Help I want to ` _setOpacity(newAppearance->Opacity());` in `ControlCore::ApplyAppearance` so the opacity changes according to unfocused opacity and focused opacity. But as you can see below the windows becomes unfocused when opening the command palette and focused when closing it so then the adjust opacity's `_setOpacity` gets overridden by the one in `ControlCore::ApplyAppearance` ![check_command_pallette](https://github.com/microsoft/terminal/assets/15957528/ed1e8869-0e95-4e3e-bdfc-33c6dfaccb20)
Author
Owner

@zadjii-msft commented on GitHub (Sep 7, 2023):

Hmm that's got shades of #11571 in it, though we went through a pretty major settings re-write after that... Don't think I'll have time to dig in this week before I leave, and I'll be ignoring mail all week next week.

I'd say file a follow-up that we can get to now that we're merging #15923

@zadjii-msft commented on GitHub (Sep 7, 2023): Hmm that's got shades of #11571 in it, though we went through a pretty major settings re-write after that... Don't think I'll have time to dig in this week before I leave, and I'll be ignoring mail all week next week. I'd say file a follow-up that we can get to now that we're merging #15923
Author
Owner

@Jaswir commented on GitHub (Sep 8, 2023):

@zadjii-msft

Hey Mike, I've been contributing here for a while now.

How do you think I am doing?
Do you maybe have general feedback, anything I can improve on?

Let me know when you're back.

@Jaswir commented on GitHub (Sep 8, 2023): @zadjii-msft Hey Mike, I've been contributing here for a while now. How do you think I am doing? Do you maybe have general feedback, anything I can improve on? Let me know when you're back.
Author
Owner

@Jaswir commented on GitHub (Sep 13, 2023):

@ianjoneill
Awesome that you completed this: https://github.com/microsoft/terminal/pull/14999
I remember you helping me out here when I just started: https://github.com/microsoft/terminal/issues/15127

Thanks again!

Carrying on your legacy now xD
image

Hope you're well.

@Jaswir commented on GitHub (Sep 13, 2023): @ianjoneill Awesome that you completed this: https://github.com/microsoft/terminal/pull/14999 I remember you helping me out here when I just started: https://github.com/microsoft/terminal/issues/15127 Thanks again! Carrying on your legacy now xD ![image](https://github.com/microsoft/terminal/assets/15957528/acdca1b7-5fe8-4914-b1f6-107c05cb5b2c) Hope you're well.
Author
Owner

@Jaswir commented on GitHub (Sep 16, 2023):

@DHowett @DHowett-MSFT

I'd say file a follow-up that we can get to now that we're merging https://github.com/microsoft/terminal/pull/15923

What does Mike mean with this? Is he suggesting to make a PR for 11092 for the team to look at?

@Jaswir commented on GitHub (Sep 16, 2023): @DHowett @DHowett-MSFT > I'd say file a follow-up that we can get to now that we're merging https://github.com/microsoft/terminal/pull/15923 What does Mike mean with this? Is he suggesting to make a PR for 11092 for the team to look at?
Author
Owner

@Jaswir commented on GitHub (Sep 21, 2023):

@zadjii-msft

Hey Mike,
How was your Hackathon week? Hope it was nice.

I was wondering if you got a chance yet to answer my question:
I've been contributing here for a while now.

How do you think I am doing?
Do you maybe have general feedback, anything I can improve on?

@Jaswir commented on GitHub (Sep 21, 2023): @zadjii-msft Hey Mike, How was your Hackathon week? Hope it was nice. I was wondering if you got a chance yet to answer my question: I've been contributing here for a while now. How do you think I am doing? Do you maybe have general feedback, anything I can improve on?
Author
Owner

@Jaswir commented on GitHub (Sep 21, 2023):

@zadjii-msft

I'll just come up straight with it.
I am looking for a referral for Microsoft.
Can you give me a referral?

Solving 7158 boosted my confidence to start seriously applying to Big Tech Jobs. Can you give me a referral? I rather have a referral from you then someone that doesn’t know me.

Has there been other contributors that you’ve given referrals for Microsoft Applications? What are you guys like? Do you give referrals to contributors?

@Jaswir commented on GitHub (Sep 21, 2023): @zadjii-msft I'll just come up straight with it. I am looking for a referral for Microsoft. Can you give me a referral? Solving 7158 boosted my confidence to start seriously applying to Big Tech Jobs. Can you give me a referral? I rather have a referral from you then someone that doesn’t know me. Has there been other contributors that you’ve given referrals for Microsoft Applications? What are you guys like? Do you give referrals to contributors?
Author
Owner

@Jaswir commented on GitHub (Oct 5, 2023):

@zadjii-msft

Hi Mike,

How are you?
Haven't heard from you in a while.
I am worried.

I hope you'll respond.
Thanks,

Have a good weekend!

@Jaswir commented on GitHub (Oct 5, 2023): @zadjii-msft Hi Mike, How are you? Haven't heard from you in a while. I am worried. I hope you'll respond. Thanks, Have a good weekend!
Author
Owner

@Jaswir commented on GitHub (Oct 14, 2023):

@zadjii-msft

Hey Mike,

Some Questions.

There are a couple problems I find interesting to work towards:

  1. https://github.com/microsoft/terminal/issues/3158
    Can you point me to some like easy issue to get familiar with CWD, manipulating it and stuff?

  2. https://github.com/microsoft/terminal/issues/2664
    https://github.com/microsoft/terminal/issues/190

    I have a feeling that both of these have to do with DX engine and Atlas Engine (since they are both kinda fonts)
    Is that right?

  3. https://github.com/microsoft/terminal/issues/2664

    Can you point me to some easy issues to get familiar with DX Engine, Atlas Engine?

Ugh, I tagged the issues again ...

@Jaswir commented on GitHub (Oct 14, 2023): @zadjii-msft Hey Mike, Some Questions. There are a couple problems I find interesting to work towards: 1. https://github.com/microsoft/terminal/issues/3158 Can you point me to some like easy issue to get familiar with CWD, manipulating it and stuff? 2. https://github.com/microsoft/terminal/issues/2664 https://github.com/microsoft/terminal/issues/190 I have a feeling that both of these have to do with DX engine and Atlas Engine (since they are both kinda fonts) Is that right? 3. https://github.com/microsoft/terminal/issues/2664 Can you point me to some easy issues to get familiar with DX Engine, Atlas Engine? Ugh, I tagged the issues again ...
Author
Owner

@zadjii-msft commented on GitHub (Oct 16, 2023):

First off, lemme level with you: Those are truly some of the gnarliest issues on our repo. There's a reason they're still open despite the number of upvotes on them.

  • #3158:
    • This is hard, because it's a lot of plumbing for basically heuristics. The Terminal always needs to internally store the CWD of the shell as a Windows path. However, apps that might be emitting a OSC7 sequence might be emitting it as a linux-style path. They might be WSL, they might be cygwin. They might be one of the Terminal's built-in dynamic WSL profiles, they might be one of Canonical's own distro profiles. They might just be a hand-rolled WSL profile.
    • At least for the WSL cases, we should probably be able to do some kind of heuristic to determine that it is a WSL distro, then translate internally that WSL-relative path, into a Windows-relative one.
    • That involves plumbing a bunch of settings (profile.commandline, profile.source... maybe others) into the TermControl, or the ConptyConnection, or maybe elsewhere.
      • maybe we only need to apply the heuristic in TerminalApp, then plumb in some sort of relativeRoot to TermControl. I dunno.
    • That way, when the linux CLI app emits a WSL-relative path, we can make sure to treat it internally as a Windows path.
  • #190:
    • This Leonard is pretty actively working on, and isn't work I'd ask a community member to futz with. The main missing bit for emoji support - M:N glyph storage (#1472) is Hard to do.
  • #2664:
    • This is probably the most doable. However, I don't really know the most about how dwrite works, so I'm not a ton of help here.
    • Conceptually, the gist of this issue is: A font like Consolas doesn't actually have every glyph in it. Especially for things like the Powerline glyphs, but also for things like supporting other languages that use more than just the latin glyphs. Since Consolas (et. al.) doesn't actually have those glyphs, it would be good to support a list of "fallback" fonts, to then try and look for the glyph in that font next.
    • Alas, it looks like Leonard has been quite aggressive in making sure to close out atlas engine bugs: https://github.com/microsoft/terminal/issues?q=is%3Aopen+is%3Aissue+label%3AArea-AtlasEngine so there's not a lot of easy places to get started in that list...
    • This comment: https://github.com/microsoft/terminal/pull/14959#discussion_r1169113851 is literally the only lead I have on the subject.

Ugh, I tagged the issues again

Meh, don't worry about it. Folks don't get emails when threads are linked, so no one usually notices or cares.

@zadjii-msft commented on GitHub (Oct 16, 2023): First off, lemme level with you: Those are truly some of the gnarliest issues on our repo. There's a reason they're still open despite the number of upvotes on them. * #3158: * This is hard, because it's a lot of plumbing for basically heuristics. The Terminal always needs to internally store the CWD of the shell as a Windows path. However, apps that might be emitting a OSC7 sequence might be emitting it as a linux-style path. They might be WSL, they might be cygwin. They might be one of the Terminal's built-in dynamic WSL profiles, they might be one of Canonical's own distro profiles. They might just be a hand-rolled WSL profile. * At least for the WSL cases, we should probably be able to do some kind of heuristic to determine that it is a WSL distro, then translate internally that WSL-relative path, into a Windows-relative one. * That involves plumbing a bunch of settings (`profile.commandline`, `profile.source`... maybe others) into the `TermControl`, or the `ConptyConnection`, or maybe elsewhere. * maybe we only need to apply the heuristic in TerminalApp, then plumb in some sort of `relativeRoot` to `TermControl`. I dunno. * That way, when the linux CLI app emits a WSL-relative path, we can make sure to treat it internally as a Windows path. * #190: * This Leonard is pretty actively working on, and isn't work I'd ask a community member to futz with. The main missing bit for emoji support - M:N glyph storage (#1472) is **H**ard to do. * #2664: * This is probably the most doable. However, I don't really know the most about how dwrite works, so I'm not a ton of help here. * Conceptually, the gist of this issue is: A font like Consolas doesn't actually have every glyph in it. Especially for things like the Powerline glyphs, but also for things like supporting other languages that use more than just the latin glyphs. Since Consolas (et. al.) doesn't actually have those glyphs, it would be good to support a list of "fallback" fonts, to then try and look for the glyph in that font next. * Alas, it looks like Leonard has been quite aggressive in making sure to close out atlas engine bugs: https://github.com/microsoft/terminal/issues?q=is%3Aopen+is%3Aissue+label%3AArea-AtlasEngine so there's not a lot of easy places to get started in that list... * This comment: https://github.com/microsoft/terminal/pull/14959#discussion_r1169113851 is literally the only lead I have on the subject. > Ugh, I tagged the issues again Meh, don't worry about it. Folks don't get emails when threads are linked, so no one usually notices or cares.
Author
Owner

@Jaswir commented on GitHub (Oct 23, 2023):

@zadjii-msft

I am considering the next steps in my career, I am looking into startups (at my current job I do Web Dev).
I could either go in the direction of AI / C++ or Mobile Development or both? But the jobs I've been looking at seem to be either AI/C++ or Embedded System/C++ sometimes combined with Javascript for Web Dev of the company or Only Mobile Dev with React Native but no C++.

I am worried to go in the direction of C++/AI. It seems to me like a small fraction of jobs involve C++ development. Most involve mobile development since the market for it is bigger, around 80% of internet traffic is from Mobile. That being said right now we have entered the Era of AI and so maybe the future market is AI and C++?

I want experience that allows to apply to a wide range of jobs and don't want to get stuck in a box where I can't transition easily anymore. I've been in that before with Game Dev where I pretty much dug my own grave well at least the more I did it the more I felt like I couldn't get out of it anymore since I knew so much about it.
I don't know if that makes sense. If I do Mobile Dev with e.g. react native it seems like there will be tons of companies to go to so I can be flexible and don't have to worry about getting stuck at a company since there are so many other companies I could go to if things don't work out or something.

But seriously though - I've been working through re-writes of the Console codebase for 8 years now. I helped design the architecture of the Terminal codebase itself. That's been my 9-5 for years, at this point, it's just instinct.

As someone that has been doing C++ development for the past 8 years of their live.
How valuable is C++ development in the long run? It seems to me it's mostly build for programming machines, so embedded systems and with AI for programming the GPU with Cuda or Compiler engineering, to increase AI performance. Which to me seems like a small fraction of the job market. Maybe in the future it will boom with AI though.

Do you feel like you are kinda stuck in terms of jobs? Like you dug your own grave? Like can't translate easily to other companies because you don't have xp with web or mobile development. For example one thing I always wondered about like this is like desktop development, but some people build backend with C++. I don't know if you've done web development before with c++? But do you think your C++ knowledge would be valuable to a company that uses C++ primarily for backend development?

From my perspective I can't see that, since I am not that good at C++ when applying before I'd apply to C# jobs for backend with desktop development experience in C# only. And I couldn't see it either what the value was of that for backend C# cause I wasn't that good at C#. But I think you might see it?

Also do you think in the future C++ will take a bigger share of the market cause of AI and become the new Mobile Dev hype? So like majority of jobs will ask for C++?

Also what do you think knowledge of C++ is worth? How valuable do you think it is?

@Jaswir commented on GitHub (Oct 23, 2023): @zadjii-msft I am considering the next steps in my career, I am looking into startups (at my current job I do Web Dev). I could either go in the direction of AI / C++ or Mobile Development or both? But the jobs I've been looking at seem to be either AI/C++ or Embedded System/C++ sometimes combined with Javascript for Web Dev of the company or Only Mobile Dev with React Native but no C++. I am worried to go in the direction of C++/AI. It seems to me like a small fraction of jobs involve C++ development. Most involve mobile development since the market for it is bigger, around 80% of internet traffic is from Mobile. That being said right now we have entered the Era of AI and so maybe the future market is AI and C++? I want experience that allows to apply to a wide range of jobs and don't want to get stuck in a box where I can't transition easily anymore. I've been in that before with Game Dev where I pretty much dug my own grave well at least the more I did it the more I felt like I couldn't get out of it anymore since I knew so much about it. I don't know if that makes sense. If I do Mobile Dev with e.g. react native it seems like there will be tons of companies to go to so I can be flexible and don't have to worry about getting stuck at a company since there are so many other companies I could go to if things don't work out or something. >But seriously though - I've been working through re-writes of the Console codebase for 8 years now. I helped design the architecture of the Terminal codebase itself. That's been my 9-5 for years, at this point, it's just instinct. As someone that has been doing C++ development for the past 8 years of their live. How valuable is C++ development in the long run? It seems to me it's mostly build for programming machines, so embedded systems and with AI for programming the GPU with Cuda or Compiler engineering, to increase AI performance. Which to me seems like a small fraction of the job market. Maybe in the future it will boom with AI though. Do you feel like you are kinda stuck in terms of jobs? Like you dug your own grave? Like can't translate easily to other companies because you don't have xp with web or mobile development. For example one thing I always wondered about like this is like desktop development, but some people build backend with C++. I don't know if you've done web development before with c++? But do you think your C++ knowledge would be valuable to a company that uses C++ primarily for backend development? From my perspective I can't see that, since I am not that good at C++ when applying before I'd apply to C# jobs for backend with desktop development experience in C# only. And I couldn't see it either what the value was of that for backend C# cause I wasn't that good at C#. But I think you might see it? Also do you think in the future C++ will take a bigger share of the market cause of AI and become the new Mobile Dev hype? So like majority of jobs will ask for C++? Also what do you think knowledge of C++ is worth? How valuable do you think it is?
Author
Owner

@zadjii-msft commented on GitHub (Oct 23, 2023):

Alright I probably don't have enough time to share everything I'd like to, but I'll try to add some quick notes:

  • Take my own experience with a grain of salt - I had one internship before interning with MSFT, then got an offer from my internship, and have been here my whole professional career. So, I haven't had to really attempted switching roles.
  • I only had maybe 2 C++ classes in college before my internship here. Nothing too extensive - honestly they were like 99% just C code anyways.
  • I subscribe to the school of thought that over-indexing on specific language/framework is probably a fallacy. Software Engineering is more about plumbing than anything. Knowing a specific domain can surely be helpful, but I feel like big-picture, companies don't really care if you have 5 years experience in LanguageY and they're hiring for LanguageZ. At a certain point in your career, code is just code. A couple weeks of learning and you'll probably be up-to-speed enough in whatever new language you're using. Knowing big-picture how to plumb pieces together (and communicate plans of how to do that) is more valuable than knowing how to reverse a string in a language.
  • FWIW I have also done side-projects all over the stack - Android & Java, C#, and a TON of python backend/TS frontend. Nothing great, but enough to know the languages. There's nothing I like writing less than C++, to be totally honest1 . I don't think I'd have any difficulty honestly - other languages are still at the end of the day, just code.
  • I don't really want to commentate too much on modern dev trends. I personally feel like AI has a lot of the tulip mania going on, I probably wouldn't overindex on that too much myself. I'd honestly focus more on what kinds of code you actually enjoy writing. Do you like writing code that end-users will use directly? Go towards JS/React/C#/MAUI/Swift/etc. Like doing behind the scenes work? C++/Rust/C#. Like just writing a lot of code fast(even if the code doesn't go so fast)? Python's great for that.
  • IMO, C++ isn't going anywhere, up or down. It just is. It's simply not a modern language experience, but it's got a fuckton of legacy. Knowing how to write C++ makes me feel like a god in python for how much easier python seems.

Honestly, C# probably strikes good balance place - widespread enough that there are tons of careers. Close enough to Java/whatever's going on at Apple these days that moving to those would be easy. TS is pretty similar too, so again, not the most painful move. And of course, transitioning down to C++ wouldn't be the end of the world from C++.


  1. that's a lie, JS is an abomination. TS is nice though ↩︎

@zadjii-msft commented on GitHub (Oct 23, 2023): Alright I probably don't have enough time to share everything I'd like to, but I'll try to add some quick notes: * Take my own experience with a grain of salt - I had one internship before interning with MSFT, then got an offer from my internship, and have been here my whole professional career. So, I haven't had to really attempted switching roles. * I only had maybe 2 C++ classes in college before my internship here. Nothing too extensive - honestly they were like 99% just C code anyways. * I subscribe to the school of thought that over-indexing on specific language/framework is probably a fallacy. Software Engineering is more about plumbing than anything. Knowing a specific domain can surely be helpful, but I feel like big-picture, companies don't really care if you have 5 years experience in LanguageY and they're hiring for LanguageZ. At a certain point in your career, code is just code. A couple weeks of learning and you'll probably be up-to-speed enough in whatever new language you're using. Knowing big-picture how to plumb pieces together (and communicate plans of how to do that) is more valuable than knowing how to reverse a string in a language. * FWIW I have also done side-projects all over the stack - Android & Java, C#, and a TON of python backend/TS frontend. Nothing great, but enough to know the languages. There's nothing I like writing less than C++, to be totally honest[^1]. I don't think I'd have any difficulty honestly - other languages are still at the end of the day, just code. * I don't really want to commentate too much on modern dev trends. I personally feel like AI has a lot of the tulip mania going on, I probably wouldn't overindex on that too much myself. I'd honestly focus more on what kinds of code you actually enjoy writing. Do you like writing code that end-users will use directly? Go towards JS/React/C#/MAUI/Swift/etc. Like doing behind the scenes work? C++/Rust/C#. Like just writing a lot of code fast(even if the code doesn't go so fast)? Python's great for that. * IMO, C++ isn't going anywhere, up or down. It just is. It's simply not a modern language experience, but it's got a fuckton of legacy. Knowing how to write C++ makes me feel like a god in python for how much easier python seems. Honestly, C# probably strikes good balance place - widespread enough that there are tons of careers. Close enough to Java/_whatever's going on at Apple these days_ that moving to those would be easy. TS is pretty similar too, so again, not the most painful move. And of course, transitioning down to C++ wouldn't be the end of the world from C++. [^1]: that's a lie, JS is an abomination. TS is nice though
Author
Owner

@Jaswir commented on GitHub (Oct 27, 2023):

@zadjii-msft

Made a sideproject you might like, that being said I kinda assume you know every cmd command and powershell command by head now, well at least the ones that are most used and rarely lookup commands anymore. Maybe it's more for different audience. Anyway thought I'd share it with you as well.

Made an AI Powershell Plugin - Which-Command GPT. Reduce time looking for commands, increase performance at work. Which command to use in Terminal for Windows? - Which-Command GPT - AI PowerShell Plugin - Answers that for you.

which-command_gif

Features:

👉 Answers which command to use
👉 Copy and paste the command directly in your terminal

Try it out yourself: https://jaswirraghoe.blogspot.com/2023/10/which-command-gpt.html

@Jaswir commented on GitHub (Oct 27, 2023): @zadjii-msft Made a sideproject you might like, that being said I kinda assume you know every cmd command and powershell command by head now, well at least the ones that are most used and rarely lookup commands anymore. Maybe it's more for different audience. Anyway thought I'd share it with you as well. Made an AI Powershell Plugin - Which-Command GPT. Reduce time looking for commands, increase performance at work. Which command to use in Terminal for Windows? - Which-Command GPT - AI PowerShell Plugin - Answers that for you. ![which-command_gif](https://github.com/microsoft/terminal/assets/15957528/43a01510-97c4-4594-9b0c-2db2e35cc0f0) **Features:** :point_right: Answers which command to use :point_right: Copy and paste the command directly in your terminal **Try it out yourself:** https://jaswirraghoe.blogspot.com/2023/10/which-command-gpt.html
Author
Owner

@Jaswir commented on GitHub (Oct 30, 2023):

@zadjii-msft

There's nothing I like writing less than C++
Wait I understand you don't like writing C++ and would much rather write something else?
Do you feel like you are kinda stuck ? Like you dug your own grave? Like can't translate easily to other companies / roles, like you have to do C++/Rust now forever?

@Jaswir commented on GitHub (Oct 30, 2023): @zadjii-msft There's nothing I like writing less than C++ Wait I understand you don't like writing C++ and would much rather write something else? Do you feel like you are kinda stuck ? Like you dug your own grave? Like can't translate easily to other companies / roles, like you have to do C++/Rust now forever?
Author
Owner

@Jaswir commented on GitHub (Oct 30, 2023):

@zadjii-msft

What function tells me whether the command palette is currently open?
command_palette_open

When the palette is open window becomes unfocused. It shouldn't
image

@Jaswir commented on GitHub (Oct 30, 2023): @zadjii-msft What function tells me whether the command palette is currently open? ![command_palette_open](https://github.com/microsoft/terminal/assets/15957528/1ff976b0-040b-46ed-8eaf-67dd77399f9f) When the palette is open window becomes unfocused. It shouldn't ![image](https://github.com/microsoft/terminal/assets/15957528/879e9884-a61a-4964-8439-fe8c665d70bc)
Author
Owner

@zadjii-msft commented on GitHub (Oct 30, 2023):

Wait I understand you don't like writing C++ and would much rather write something else?

Absolutely. Working in C++ is just a pain compared to literally any modern programming language. Compiler messages are terrible, tooling is terrible, stl is bizarre at times, package management is nonexistent. Just a dumpster fire. Fast though, lots of examples, and used ubiquitously in the OS.

Do you feel like you are kinda stuck

Not even remotely. I'm confident that I'm a good engineer with solid fundamentals, good communication skills1 , and fairly good at reasoning about complicated dependencies. All that'll translate to any other project or language.

What function tells me whether the command pallette is currently open

TerminalPage::_commandPaletteIs(Visibility::Visible) should do the trick


  1. for an engineer ↩︎

@zadjii-msft commented on GitHub (Oct 30, 2023): > Wait I understand you don't like writing C++ and would much rather write something else? Absolutely. Working in C++ is just a pain compared to literally any modern programming language. Compiler messages are terrible, tooling is terrible, stl is bizarre at times, package management is nonexistent. Just a dumpster fire. Fast though, lots of examples, and used ubiquitously in the OS. > Do you feel like you are kinda stuck Not even remotely. I'm confident that I'm a good engineer with solid fundamentals, good communication skills[^1], and fairly good at reasoning about complicated dependencies. All that'll translate to any other project or language. > What function tells me whether the command pallette is currently open `TerminalPage::_commandPaletteIs(Visibility::Visible)` should do the trick [^1]: for an engineer
Author
Owner

@Jaswir commented on GitHub (Oct 30, 2023):

@zadjii-msft

Nvm don't need to do that, there's a much easier hack that'll do the trick

that's a lie, JS is an abomination. TS is nice though . Honestly, C# probably strikes good balance place

You're such a Microsoft Employee xD!
Are you allowed to use a different browser than Microsoft Edge?

@Jaswir commented on GitHub (Oct 30, 2023): @zadjii-msft Nvm don't need to do that, there's a much easier hack that'll do the trick > that's a lie, JS is an abomination. TS is nice though . Honestly, C# probably strikes good balance place You're such a Microsoft Employee xD! Are you allowed to use a different browser than Microsoft Edge?
Author
Owner

@Jaswir commented on GitHub (Nov 19, 2023):

@zadjii-msft

Am very much into AI these days, hence my absence.
Thought I'd let you know. Hope you're well.

@Jaswir commented on GitHub (Nov 19, 2023): @zadjii-msft Am very much into AI these days, hence my absence. Thought I'd let you know. Hope you're well.
Author
Owner

@Jaswir commented on GitHub (Nov 25, 2023):

@zadjii-msft
Are there AI Opensource project at Microsoft you recommend?

@Jaswir commented on GitHub (Nov 25, 2023): @zadjii-msft Are there AI Opensource project at Microsoft you recommend?
Author
Owner

@zadjii-msft commented on GitHub (Dec 6, 2023):

Are there AI Opensource project at Microsoft you recommend?

Honestly, not a lot that I intimately know of. I've been pretty checked out of the LLM work for the last couple months. Terminal Chat is an LLM-backed feature, but that's more of a frontend application built on top of existing models. It's not really about building or training models itself.

@zadjii-msft commented on GitHub (Dec 6, 2023): > Are there AI Opensource project at Microsoft you recommend? Honestly, not a lot that I intimately know of. I've been pretty checked out of the LLM work for the last couple months. Terminal Chat is an LLM-backed feature, but that's more of a frontend application built on top of existing models. It's not really about building or training models itself.
Author
Owner

@carlos-zamora commented on GitHub (Sep 4, 2024):

I'm gonna go ahead and close this. We have these commands in the command palette:
"Set background opacity" commands in command palette

That's already exposed with the adjustOpacity action.

@carlos-zamora commented on GitHub (Sep 4, 2024): I'm gonna go ahead and close this. We have these commands in the command palette: !["Set background opacity" commands in command palette](https://github.com/user-attachments/assets/37a87638-bc5e-44bb-a0b0-20a4aabd8983) That's already exposed with the `adjustOpacity` action.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3545