levnikmyskin / hyprland-virtual-desktops

A plugin for the Hyprland compositor, implementing virtual-desktop functionality.
BSD 3-Clause "New" or "Revised" License
110 stars 9 forks source link

Move window to same monitor on different vdesk #20

Closed WhySoBad closed 8 months ago

WhySoBad commented 8 months ago

When moving a window from DP-2 (ID 1) from vdesk 1 to vdesk 2 it get's moved to DP-3 (ID 2). I would expect for the window to be moved to vdesk 2 on DP-2.

It would be nice if there was a way of passing a monitor (name or id) to the window move dispatchers which specifies the target monitor of the moved window. Ideally, all move dispatchers default to moving the window to the same monitor on the other vdesk and an additional monitor argument allows to override this behavior.

The movetodesk dispatcher would then allow the following syntax: movetodesk 2,monitor:DP-2

levnikmyskin commented 8 months ago

Sounds reasonable to me. I've been working on another feature the past few days (there's an open pr already). I'll probably get some time to work on this next week though

levnikmyskin commented 8 months ago

https://github.com/levnikmyskin/hyprland-virtual-desktops/pull/22

You can try this if you want. I'll merge it in the next days at some point ^^

WhySoBad commented 8 months ago

Thanks, i'll test it tomorrow and give feedback

WhySoBad commented 8 months ago

Sorry, I didn't gave any feedback. Since I use hyprland-git it turned out to be a bit complicated to test the plugin. On this note, do you consider supporting hyprland-git in the future? At first use I didn't realize you weren't but since the hyprlang update was merged into hyprland-git the plugin crashed (for obvious reasons).

levnikmyskin commented 8 months ago

No worries. As far as I could test there were no problems, so I merged the PR.
Regarding hyprland-git, I'm not planning to support it. You can take a look at Hyprland commit history: it's HUGE, Vaxry commits and merges a lot of stuff every day, and I cannot possibly fix every build issue.
However, I sometimes also contribute to Hyprland itself and thus I run Hyprland built from random commits too, usually with no problems. You should be able to do this as well, as long as there are no breaking changes for plugins (which are honestly rare)