fuhsjr00 / bug.n

Tiling Window Manager for Windows
GNU General Public License v3.0
3.36k stars 213 forks source link

Dual Monitor on set of screens #151

Open cataclysmic opened 6 years ago

cataclysmic commented 6 years ago

Is it possible to create one set of virtual screen for a dual monitor setup? Currently I have 2 sets, one from 1 to 9 for each monitor. I am used to i3wm where the 2 monitors are handled a 2 separate virtual screens.

Also my windows get confused. If I open a window one monitor on screen say 1 and pull it to the other monitor on screen 1 and switch 2 screen 2 the moved window snaps back to the original monitor it was opened on. I guess that's because the list have the same numeration and therefore labels.

joten commented 6 years ago

I do not know, if I understand you correctly, but you may use Config_syncMonitorViews=1 as described in the section Window arrangement in doc/Default_configuration.md; therewith the views on each monitor are handled as one when switching the view.

Regarding the other subject: bug.n is currently not triggered, when windows are moved by other means than those provided by bug.n itself (i.e. the function Manager_setWindowMonitor). If you e.g. drag a window between monitors, the lists are not updated. Please try WinShift. on the active window to move it to the next monitor, and have a look if the behaviour is as expected.

cataclysmic commented 6 years ago

Thank you for the hints. I must have missed that. The behavior is still different from i3wm but close enough to work.

Example for i3wm behavior: virtual screens 1,3,6,7 on the left monitor, screens 2,4,5 on the right monitor. Navigation as known. As a side note i3wm also offers dynamic screen creation and deletion, i.e., a screen like 2 is only created once it's called and contains windows. If you leave it and there is no window open in it is is destroyed.

kalj commented 6 years ago

If I understand this correctly, I'd also like to request this. In Xmonad, the two monitors are just 'cursors' into the same set of tags. This way, each monitor can change tag independently, but chooses from the same set of tags. As for the case when trying to view e.g. tag 1 on Monitor A which is currently shown on Monitor B, the default behavior is simply swap the two visible tags (see Xmonad Wiki for details).

I might be of limited use, but I'd be happy to help out. Do we have a feeling for what would be needed/what the obstacles are?

joten commented 6 years ago

As far as I can see the behaviour from i3wm described above would be similar to "view" (not "greedyView"). To implement this bug.n would need to be rewritten -- more or less -- since with the current concept views on the one hand inherit their dimensions from the monitor, and on the other hand all monitors have the same set of views (with each having thei own set of windows).

Althogh, implementing Xmonad's greedyView would be possible with the current monitor-view-concept; there has been an attempt with pr #59, but it some kind of got lost.

Personally I more like "view" than "greedyView"; I would like to have a more flexible view concept like the one from i3wm, but rewriting all the code necessary for that, is beyond my current possibilities (spare time).

kalj commented 6 years ago

Okay, I see. Thanks for pointing me to that PR, I will take a look and see what I can do!

kalj commented 6 years ago

@joten As an aside, I have two other questions (is there no way to send private messages here?):

  1. Is there a function to reset the view of a tag (in particular, the current one)? I can do View_setLayout(1) to reset the layout, but I'd also like to get the default MY/MX/MFactor/whatever else is significant.
  2. In case the answer is no, can I map several function calls to one key? Or do I need to define a new function, and can I do that in the Config.ini file or does it have to go in the source code?
joten commented 6 years ago

is there no way to send private messages here?

Just git and GitHub ;-)

  1. No, not yet.
  2. can I map several function calls to one key?

This would be possible, but some of the View_setLayoutProperty function calls are not designed to allow absolute values; therewith it is a bit more complicated.

can I do that in the Config.ini file or does it have to go in the source code?

No, it has to go in the source code.

Since it is a bit more complicated, I will commit the code -- roughly tested.

kalj commented 6 years ago

Wow, thanks!

mfaerevaag commented 6 years ago

I would also like to announce my interest for i3-like behavior, where there's is a single set of workspaces across all monitors and going to a specific workspace also focuses (or activates, in bug.n terms) the corresponding monitor. Anyways, awesome job and thanks for helping making Windows a little less cancerous for us used to Linux ❤️