mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[FEAT]: Compatability With Altsnap #178
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TooSpooky on GitHub (Feb 23, 2023).
Is your feature request related to a problem? Please describe.
Whilst outside of the scope of the project probably, when moving a window using Altsnap the window does not properly function within Komorebi and it floats freely instead of switching places with another window. When moving a window normally it fixes itself.
Describe the solution you'd like
The ability for Altsnap (i.e press alt and drag) to function as a normal drag within Komorebi, no clue if this would be on either Komorebi or Altsnap's end.
@RamonUnch commented on GitHub (Mar 10, 2023):
Would not it be enough to call
komorebic toggle-floaton a ahk script on Alt+Click? like this the window would be go to float mode and when you release Alt+Click the ahk script would would have to calltoggle-floatagain. I am the maintainer of AltSnap.@TooSpooky commented on GitHub (Mar 10, 2023):
Thanks for the reply, I'll have to see if I can try that out. I'm not all that familiar with AHK or the like so I didn't think of that. You've been super helpful as maintainer of altsnap in the past by the way, I appreciate it.
@RamonUnch commented on GitHub (Mar 10, 2023):
I tried very simply this script alongside AltSnap
Unfortunately it cannot work because AltSnap has to block the mouse event so AHK cannot get it.
It is possible in theory by modifying AltSnap, however before trying to do this I would like to know if it is worth it.
So the question is: When making a window floating, then moving it to where it belongs, then making it unfloat, is the behavior what would be wanted?
There is another problem and it is that I can toggle float mode with a command but there seems to be no methods to just enable float mode and then disable it, It would be nice if komorebic could handle that (with an additional reference counter) so that if a window is already floating and someone sends
komorebic make-floatthenkomorebic unmake-floatthe window would be still floating at the end. I could probably create a named pipe and communicate more deeply with komorebic but it starts to be quite more complex.@LGUG2Z commented on GitHub (Mar 10, 2023):
https://github.com/LGUG2Z/komorebi/issues/34 This issue has more details of a prior investigation into something similar. When I have some time this weekend I'll try to play around with AltSnap + komorebi and see what is going on in the interactions underneath the hood.
@TooSpooky commented on GitHub (Mar 10, 2023):
Pretty much so yes, the behavior I’m thinking of would be the same as simply dragging with your mouse in komorebi, I.E. switching the windows position with another. For the added consistency and easy instead of having to use the title bars to drag.
Potentially the ability to take a floating window and alt dragging it over an unfloating window and unfloating the floating window into that position would also he nice with a modifier, but I’m unsure if that’s too much added complexity.
Thanks for both your interests into the issue! I’m very unfamiliar with this sort of work so apologies I cannot assist much.
@donkee commented on GitHub (May 12, 2024):
It's been a while since this issue has been updated, but I just started using both these apps and was wondering if anybody had looked into this more?
@clownroyal420 commented on GitHub (Sep 19, 2024):
@donkee
It sounds like we might see support in the next release of AltSnap (with possibly either the night release or next major release of Komorebi).
For now I threw together a (messy) solution in my
komorebi.ahkscript to resize and move windows via the System Menu (Alt+Space would be the default bind. It's delightfully janky and not as clean/pretty/worry-free as AltSnap but it does let me move/resize windows without having to move my hand off the mouse or strain my wrist to grab the title bar or window border. I find that if you use it slowly it does a little better.I definitely intend to switch 100% back to AltSnap next release if it works with Komorebi but this is what I have to hold me over till then. I'm happy to consider suggested alternatives to this method.
Lo and behold, here's what I have inserted into my
komorebi.ahkscript (and here's a repo with my komorebei.json and komorebi.ahk:@RamonUnch commented on GitHub (Nov 17, 2024):
Normally with the latest AltSnap 1.64 things should have improved.
@LGUG2Z commented on GitHub (Nov 17, 2024):
I am using this integration daily now and it's more than stable enough for everyday use - thank you!