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

Multiple display support #1

Closed
frontoge opened this issue Apr 12, 2021 · 12 comments
Closed

Multiple display support #1

frontoge opened this issue Apr 12, 2021 · 12 comments
Labels
feature New feature or request

Comments

@frontoge
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Currently as far as I am aware the tiling only applies to one monitor. Which makes it feel like I am only utilizing half the space I could be (I can still use the other monitor but the tiling isn't there)

Describe the solution you'd like
A clear and concise description of what you want to happen.
It would be nice to have this supported on displays other than the primary/default. Along with key binds to move the windows/tiles across displays as they are configured in the windows display settings.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Configuring the layout of the displays in the settings of the application would also be more than sufficient.

Additional context
Add any other context or screenshots about the feature request here.
image
Example of the tiling being applied on the right main display but not on the left secondary display

@veselink1 veselink1 added the feature New feature or request label Apr 13, 2021
@veselink1
Copy link
Collaborator

Hi @frontoge, thanks for opening a feature request!

Multiple display support is definitely something that is on my radar and being worked on. Progress is slow, because I do not own a second monitor.

Most of the groundwork is laid already, but questions remain about the UX and possible configuration options - I might follow up with that here.

The display configuration will likely be the one set in Windows Display Settings - that is what the backend (WinMan) supports.

I am planning to focus more on this for the release after the next one, so stay tuned.

@seffyroff
Copy link

I came here to add the same issue, thanks for reporting it @frontoge. I'm ready to test once this is available in a build.

@veselink1
Copy link
Collaborator

FancyWM v1.5.7 includes some very basic multi-display support. The feature is experimental and needs to be enabled from Settings > Displays. FancyWM needs to be restarted after this setting is changed.

The only thing that is supported at this point is moving windows between displays with the mouse. Keybindings will be added later. The windows should attach to the layout of the display they are on when moved.

What doesn't work:

  • Connecting, disconnecting and changing "projection" settings (duplicate, extend, etc.) causes crashes
  • Moving floating windows between displays causes them to lose the floating mode setting

If FancyWM fails to start properly after enabling the experimental multi-display support, the setting will need to be reverted manually by changing the value of ExperimentalMultiMonitorSupport in %appdata%\FancyWM\settings.json to false.

@veselink1
Copy link
Collaborator

Multi-display support is much more stable as of v1.11.0 and is now enabled by default.

@llinfeng
Copy link

llinfeng commented May 2, 2022

@veselink1 Please advise if I missed it - for App version 2.6.6.0, how to move one window to the next monitor with a keyboard shortcut?

Assuming it is not implemented for now, I find DisplayFusion doing the trick. As specified in the following screenshot, I use:

  • Ctrl+Win+L to move the window to the monitor on the right, and
  • Ctrl+Win+H to move the window to the monitor on the left

image

When moved, depending on whether there are existing windows in the destination monitor, the window moved through DisplayFusion shall snap right in, or take up the full display by occupying the "invisible top-level panel" (language borrowed from the Help tab in FancyWM Settings).

Caveat: only non-maximized windows moved through the shortcut are "managed" by FancyWM in the destination monitor. If a window has been maximized previously, restoring it and moving it through DisplayFusion won't necessarily get it to join the "panel" in the destination display. In this case, forcing the window to float will join it to the panel in the destination display. Afterwards, moving the same window with DisplayFusion shortcuts gets the job done as expected.


For more context, I use AutoHotKey to toggle the Maximize/Windowed mode for the active window using Win + Enter key.

; Source: www.autohotkey.com/board/topic/16755-help-toggle-maximizerestore-with-same-hotkey/?p=108614
#Enter:: 
   WinGet MX, MinMax, A
   If MX
        WinRestore A
   Else WinMaximize A
return

@llinfeng
Copy link

llinfeng commented May 3, 2022

One follow-up question - across multiple monitors, may there be a mode to quickly select a window by some visual cue? @veselink1 I read from your previous post that you are interested in comments about UX implementations. Here is an example:

In Vim, vim-choosewin implements a "pane-selector" interface. Upon summoning such "pane-selector", letters are drawn specifically for each visible pane as below. Typing the letter brings the cursor to the corresponding "pane". (In Vim, a "pane" is similar to a Window managed by FancyWM.)
image

@sim590
Copy link

sim590 commented Aug 25, 2022

As @llinfeng seems to point out, moving windows to other displays with the keyboard is not feasible? May be there should be an issue opened to track this. It seems to me that using the keybinds to focus a window to the right when the focus is on the rightmost window and that there is a window on a display on the right, the focus should go on the other window on the right, but it doesn't. I really have to "focus the other display" first. Since displays are always either left, right up or down wards, I would expect the keybinds I'm talking about to work accross displays.

@llinfeng
Copy link

As @llinfeng seems to point out, moving windows to other displays with the keyboard is not feasible?

In its current state, FancyWM does not support multiple-monitor setups. Within itself, it cannot move one window from one monitor to the next using shortcuts (or key-combinations). DisplayFusion is useful when it comes to moving windows around.

@veselink1
Copy link
Collaborator

veselink1 commented Sep 19, 2022

@sim590 @llinfeng
Moving windows between monitors is supported but the keybindings are not configurable in the UI in the latest version.
v2.8.0 Changelog
settings.json

@llinfeng
Copy link

Fantastic! Thanks for implementing both the features to move focus to another display and to move a window to a destination display.

@veselink1 One question: does the enumeration of the monitors strictly follow the numbers assigned to the displays under System>Display (or the Display settings window)? At times, the monitor enumeration won't be stable should I fumble with the display connections, by: accessing the machine through Remote Desktop Connection, reusing a laptop across multiple docking stations and rebooting the machine once it "settles" at one location - the enumeration of the monitors will, very frequently, change, over those maneuvers.

Here is what I see under System>Display on a Win 11 machine:
image


And, thanks to your pointer to the settings.json file - I found the new CLI parameters to use.

Sample AHK script

For fellow AHK users - here are a few mappings that worked form me. The spelling of the CLI flags are taken from this file.

^1::
Run fancywm.exe --action MoveToDisplay1
return

^2::
Run fancywm.exe --action MoveToDisplay2
return

^3::
Run fancywm.exe --action MoveToDisplay3
return

^+1::
Run fancywm.exe --action SwitchToDisplay1
return

^+2::
Run fancywm.exe --action SwitchToDisplay2
return

^+3::
Run fancywm.exe --action SwitchToDisplay3
return

@veselink1
Copy link
Collaborator

The enumeration of monitors is based on the internal device names assigned by Windows and should be consistent with the output of mstsc /l, but is different from what is shown in Settings.

@llinfeng
Copy link

Great, then, when mstsc /l returns the following list, does it mean MoveToDisplay1 will stop working, and I need to use MoveToDisplay4 instead?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants