Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Multi-monitor support #67

Closed
bryphe opened this issue Dec 9, 2016 · 3 comments · Fixed by #1747
Closed

Multi-monitor support #67

bryphe opened this issue Dec 9, 2016 · 3 comments · Fixed by #1747

Comments

@bryphe
Copy link
Member

bryphe commented Dec 9, 2016

A scenario that frequently occurs in a multiple-monitor setup at work is that I'd like to expand VIM to encompass multiple displays, and use the goodness of the easy window splitting / window navigation across monitors. Gvim on windows, at least, doesn't seem to handle this very well - I imagine the terminal clients might be better if the terminal emulator handles resize/multiple monitors, but in my case, it doesn't fit my workflow.

With Electron, it's relatively easy to change the BrowserWindow dimensions to encompass multiple screens (or alternatively, create multiple BrowserWindows that can communicate with other).

It's easy to get the information about all displays:

    require("electron').screen.getAllDisplays()

And it's also pretty easy to size the browser window:

        require('electron').remote.getCurrentWindow().setPosition(x, y)
        require("electron").remote.getCurrentWindow().setSize(.., ..)

What would be helpful in terms of workflow would be a command that is like "MonitorExpandLeft, MonitorExpandRight, MonitorExpandDown, MonitorExpandUp". This would size the window to expand to the boundary of the window if it hasn't already, or expand it out to the next window. This could be bound to something like plus arrow keys by default.

This would be somewhat gated by #20 since we need a nice way to express those commands, but we could have another hacky input added until we get that fixed..

@bryphe
Copy link
Member Author

bryphe commented Feb 5, 2018

This is a feature I would love to have. This should allow for navigation between opened Oni windows, using <C-w>l, etc. The WindowManager can already handle and detect this case - the challenge here is bubbling that up, finding the next Oni window, and focusing it. The main process knows about all the active windows, so it'd be natural to send an ipc call to it to let it handle.

Testing with multiple Oni processes will be non-trivial here, but if we can have unit tests covering the navigation cases (figuring out which window is 'left', 'right', etc), that is sufficient.

@CrossR CrossR mentioned this issue Mar 8, 2018
7 tasks
@CrossR
Copy link
Member

CrossR commented Mar 16, 2018

The bulk of this was fixed out in #1747. I'm going to make a second issue to track the remaining items I mentioned in the end of my PR.

@bryphe
Copy link
Member Author

bryphe commented Mar 19, 2018

@CrossR - thanks for the fix here! It's awesome to have this in. Don't forget to claim the bounty on it! 👍 (Either bountysource or opencollective - whatever you prefer)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants