-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7124: Add focus and maximizedFocus launch modes #7873
Conversation
… If one of them is set, focusedMode should be toggled on startup
I love this. I think you've done the |
The only difference from the fullscreen is that in the maximized focused mode, you still see the taskbar (not sure how useful it is). Added this mode as it seems that in was originally mentioned in the feature request (#7124): "I want to have maximized and focused mode when app is launch" (#7124 (comment)) Please let me know if you prefer me to delete anyway. |
Oh, fair point! Then I'm totally cool with this. I don't hate |
Yay :) |
Bless your soul In this specific case, since this is such a UI-dependent feature, I think we're cool not adding any unit tests. The enum parsing is already pretty well tested, and I'm not sure we've got any sort of framework for testing the state of the Win32 window. I'd definitely mark this as "Ready for Review" 😄 |
src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h
Outdated
Show resolved
Hide resolved
@zadjii-msft - sorry for pushing another change after the approval (I was sure that this new commit will reset it, but for some reason it didn't). I have noticed that in the megathread (#4632) there is also a request to add command-line option for this. So added it as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you a mind reader?
I was gonna go ahead and sneak the cmdline argument in after this PR merged, but hey, you've gone and already done it. Thanks for the diligence! I quite like the elegance of -Mf
for combining focus and maximized too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we'll need to update the schema in doc/cascadia! This looks excellent otherwise.
Added the schema to the cascadia docs. Should I do anything beyond validating that it works on different profile? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you can drop MaximizedFocusMode
.
You could get the same effect by calling wt.exe --focus --maximized
instead, couldn't you?
@@ -175,14 +175,24 @@ void AppCommandlineArgs::_buildParser() | |||
// -M,--maximized: Maximizes the window on launch | |||
// -F,--fullscreen: Fullscreens the window on launch | |||
auto maximizedCallback = [this](int64_t /*count*/) { | |||
_launchMode = winrt::Microsoft::Terminal::Settings::Model::LaunchMode::MaximizedMode; | |||
_launchMode = (_launchMode.has_value() && _launchMode.value() == winrt::Microsoft::Terminal::Settings::Model::LaunchMode::FocusMode) ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can drop the winrt::Microsoft::Terminal::Settings::Model::
prefix, because the file already imports the namespace. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Done!
@lhecker - please guide me here. How do you suggest to encode the combination of --focus --maximized instead? |
@DHowett - sorry for nagging, but CI is somewhat harsh with me today and I am not sure if I can somehow unblock this PR 😄
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, excellent stuff. Thank you!
This is excellent work for a first PR -- though your other work merged first! 😄
Looks like we went w/ a parameter.
All set!
@zadjii-msft summed it up quite nicely.
All set again! 😁 |
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
## Summary of the Pull Request Since we've started working on the Settings UI, a few settings have been added on `main`. This adds those missing settings over. ## References Missing settings include... - #7364: `disableAnimations` - #7873: `launchMode` `focus` and `maximizedFocus` - #7793: `bellStyle` ## Validation Steps Performed Verified that those settings appear properly in the Settings UI.
🎉 Handy links: |
This commit introduces two new launch modes: focus and maximizedFocus.
enabled.
Focus Mode enabled.
There two ways to invoke these new modes:
"maximizedFocus"
mutually exclusive with the --fullscreen, but can be combined with the
--maximized:
"maximizedFocus" mode
This should resolve a relevant part in the command line arguments
mega-thread #4632
Closes #7124
Closes #7825
Closes #7875