Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add "monitor": "any"|"toCurrent"|"toMouse" setting to globalSummon #10092

Merged
118 commits merged into from
May 17, 2021

Conversation

zadjii-msft
Copy link
Member

⚠️ this pr targets #9977

Summary of the Pull Request

This adds support for part of the monitor property for globalSummon. It also goes a little off-spec:

"monitor": "any"|"toCurrent"|"toMouse"
  • monitor: This controls the monitor that the window will be summoned from/to
    • "any": Summon the MRU window, regardless of which monitor it's currently on.
    • "toCurrent"/omitted: (default): Summon the MRU window TO the monitor with the current foreground window.
    • [NEW] "toMouse": Summon the MRU window TO the monitor where the mouse cursor is.

When I was playing with this, It felt like toMouse was always what I wanted, not toCurrent. We can always just comment that out if we think that's contentious - I'm aware I didn't originally spec that.

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

I made toMouse the default because it felt better. fite-me.jpg

Validation Steps Performed

my ever evolving blob:

    { "keys": "ctrl+`", "command": { "action": "quakeMode" } },
    { "keys": "ctrl+1", "command": { "action": "globalSummon" } },
    // { "keys": "ctrl+2", "command": { "action": "globalSummon", "desktop": "toCurrent" } },
    // { "keys": "ctrl+2", "command": { "action": "globalSummon", "toggleVisibility": false } },
    // { "keys": "ctrl+2", "command": { "action": "globalSummon", "dropdownDuration": 2000 } },
    { "keys": "ctrl+2", "command": { "action": "globalSummon", "monitor": "any" } },
    // { "keys": "ctrl+3", "command": { "action": "globalSummon", "desktop": "onCurrent" } },
    { "keys": "ctrl+3", "command": { "action": "globalSummon", "monitor": "toMouse" } },
    // { "keys": "ctrl+4", "command": { "action": "globalSummon", "desktop": "any" } },
    { "keys": "ctrl+4", "command": { "action": "globalSummon", "monitor": "toMouse", "dropdownDuration": 500 } },
    { "keys": "ctrl+5", "command": { "action": "globalSummon", "dropdownDuration": 500 } },

…!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
…ndow should be. It just always says 0 for now, but in the future it could actually give us useful info.
@github-actions

This comment has been minimized.

@miniksa
Copy link
Member

miniksa commented May 14, 2021

Man I make one comment in bug bash and here it is! Nice!

@zadjii-msft zadjii-msft added the Area-Remoting Communication layer between windows. Often for windowing behavior, quake mode, etc. label May 14, 2021
// Summon the window whenever we dispatch a commandline to it. This will
// make it obvious when a new tab/pane is created in a window.
_window->SummonWindow(false, 0);
_window->SummonWindow(summonArgs);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know i asked you not to but also I don't care that much 😄

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure you don't automerge the base! 😄

src/cascadia/WindowsTerminal/IslandWindow.cpp Outdated Show resolved Hide resolved
Base automatically changed from dev/migrie/f/quake-dropdown-final to main May 17, 2021 12:28
@zadjii-msft zadjii-msft added the AutoMerge Marked for automatic merge by the bot when requirements are met label May 17, 2021
@ghost
Copy link

ghost commented May 17, 2021

Hello @zadjii-msft!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 3866771 into main May 17, 2021
@ghost ghost deleted the dev/migrie/quake/monitor-toCurrent-with-dropdown branch May 17, 2021 12:57
@ghost
Copy link

ghost commented May 25, 2021

🎉Windows Terminal Preview v1.9.1445.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Remoting Communication layer between windows. Often for windowing behavior, quake mode, etc. AutoMerge Marked for automatic merge by the bot when requirements are met
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants