outfoxxed / hy3

Hyprland plugin for an i3 / sway like manual tiling layout
GNU General Public License v3.0
391 stars 32 forks source link

Fix the behaviour for multi-monitor setups #126

Open ChrisRuff opened 2 weeks ago

ChrisRuff commented 2 weeks ago

Mainly a revival for #5, but created in the shiftOrGetFocus. This also selects the previously selected window on the workspace (which mimics i3 more correctly).

Closes #2

ChrisRuff commented 2 weeks ago

With this implementation there are two bugs I'm struggling to solve:

  1. When a window is fullscreen, or you switch to an empty workspace, moving focus doesnt work.
  2. When moving a window to a monitor to the right, the window should be on the left of the workspace, but instead it appears on the right. (Which happens because moveNodeToWorkspace just appends the node to the end I believe)

Any tips or guidance on how I could fix that would be greatly appreciated

outfoxxed commented 1 week ago
  1. when on an empty workspace, no node is selected and there is no point of reference to move from.
  2. the node is appended after the last focused node in the given workspace
ChrisRuff commented 1 week ago

So fixed the issues with fullscreen/empty workspaces, but im still completely skipping the complex logic you have in shiftOrGetFocus when it comes to shifting the nodes to the adjacent monitor, mainly because im not sure where moving the node to the adjacent monitor would fit in there. Do you have any ideas @outfoxxed? I still need to fix the location of where shifted windows appear.

outfoxxed commented 1 week ago

I think if once then wrap the root node on the new monitor and insert the moved node next to the old root. if not then insert it with a move in that direction breaking into nested nodes.