[PR #10092] [MERGED] Add "monitor": "any"|"toCurrent"|"toMouse" setting to globalSummon #27889

Open
opened 2026-01-31 09:24:54 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10092
Author: @zadjii-msft
Created: 5/13/2021
Status: ✅ Merged
Merged: 5/17/2021
Merged by: @undefined

Base: main ← Head: dev/migrie/quake/monitor-toCurrent-with-dropdown


📝 Commits (10+)

  • 3bef7bb Get all the projects created and hooked up to the sln
  • 1f52d35 Yank all the M/P files, this builds?!
  • 5a9cdc8 Shockingly, this works, it works elevated, and it works unpackaged
  • 36539cf This won't work, but I'm committing this becaus I finally got it to compile a String[]
  • 27ace16 whoop, we pass the commandline from the peasant, to the monarch, and then back!
  • 9a41647 HOLY SHIT I GOT THE COMANDLINE TO EXECUTE IN THE CURRENT WINDOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • 5cabcfb add a note to future me
  • 03bfc6e This works as a unittest, but not a local test. That's batty
  • 590b9ff this macro makes me feel dirty
  • 0579b24 LocalTests_Remoting -> UnitTests_Remoting

📊 Changes

9 files changed (+271 additions, -29 deletions)

View changed files

📝 doc/specs/#653 - Quake Mode/#653 - Quake Mode.md (+37 -9)
📝 src/cascadia/Remoting/Peasant.idl (+10 -2)
📝 src/cascadia/Remoting/SummonWindowBehavior.h (+2 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.h (+6 -1)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.idl (+8 -0)
📝 src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h (+9 -0)
📝 src/cascadia/WindowsTerminal/AppHost.cpp (+19 -2)
📝 src/cascadia/WindowsTerminal/IslandWindow.cpp (+168 -12)
📝 src/cascadia/WindowsTerminal/IslandWindow.h (+12 -3)

📄 Description

⚠️ 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 } },

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10092 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 5/13/2021 **Status:** ✅ Merged **Merged:** 5/17/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/quake/monitor-toCurrent-with-dropdown` --- ### 📝 Commits (10+) - [`3bef7bb`](https://github.com/microsoft/terminal/commit/3bef7bbb389f7b048983bac8dda32af0e662a9fb) Get all the projects created and hooked up to the sln - [`1f52d35`](https://github.com/microsoft/terminal/commit/1f52d3583390e300b8253d605b5f79adac5e921b) Yank all the M/P files, this builds?! - [`5a9cdc8`](https://github.com/microsoft/terminal/commit/5a9cdc8b0bfda790a70368d8381559628eba554f) Shockingly, this works, it works elevated, and it works unpackaged - [`36539cf`](https://github.com/microsoft/terminal/commit/36539cfa47d1b5f3a3b0bf44f7bdcb057aa08e95) This won't work, but I'm committing this becaus I finally got it to compile a String[] - [`27ace16`](https://github.com/microsoft/terminal/commit/27ace166529367171fc81cef12aa4812e6ff8e13) whoop, we pass the commandline from the peasant, to the monarch, and then back! - [`9a41647`](https://github.com/microsoft/terminal/commit/9a41647ffe00d973f11478fb937221239d6ac81a) HOLY SHIT I GOT THE COMANDLINE TO EXECUTE IN THE CURRENT WINDOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - [`5cabcfb`](https://github.com/microsoft/terminal/commit/5cabcfb45229f686d424c6d5a2fdfca7dd446639) add a note to future me - [`03bfc6e`](https://github.com/microsoft/terminal/commit/03bfc6e8a93c901ef00b34310c4e1c313019e720) This works as a unittest, but not a local test. That's batty - [`590b9ff`](https://github.com/microsoft/terminal/commit/590b9ff0c73487720a110213c4b19a2f4a00be8e) this macro makes me feel dirty - [`0579b24`](https://github.com/microsoft/terminal/commit/0579b2417bcdd74814ea05d7eb64723542584764) LocalTests_Remoting -> UnitTests_Remoting ### 📊 Changes **9 files changed** (+271 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `doc/specs/#653 - Quake Mode/#653 - Quake Mode.md` (+37 -9) 📝 `src/cascadia/Remoting/Peasant.idl` (+10 -2) 📝 `src/cascadia/Remoting/SummonWindowBehavior.h` (+2 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.h` (+6 -1) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.idl` (+8 -0) 📝 `src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h` (+9 -0) 📝 `src/cascadia/WindowsTerminal/AppHost.cpp` (+19 -2) 📝 `src/cascadia/WindowsTerminal/IslandWindow.cpp` (+168 -12) 📝 `src/cascadia/WindowsTerminal/IslandWindow.h` (+12 -3) </details> ### 📄 Description #### ⚠️ 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: ```json "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 * Original thread: #653 * Spec: #9274 * megathread: #8888 ## PR Checklist * [x] Closes https://github.com/microsoft/terminal/projects/5#card-60325291 * [x] I work here * [ ] Tests added/passed * [ ] Requires documentation to be updated 😢 ## 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: ```jsonc { "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 } }, ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:24:54 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27889