mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
Feature request: Add support for Easy Window Drag #28
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 @da-rth on GitHub (Sep 14, 2021).
I found this AutoHotKey script which allows you to move and resize windows by holding down the Alt key + dragging the left/right mouse button, similar to that of the window moving/resizing functionality of bspwm.
The script works as expected, but it appears that komorebi does not detect the window resize events that are emitted when resizing windows via Alt+Drag. Would this type of Alt+Drag window moving/resizing functionality be possible with komorebi?
@LGUG2Z commented on GitHub (Sep 14, 2021):
I've had a look at the script but I'm still not quite able to visualize the behaviour that you have in mind and how it is different to the current current drag-edge-to-resize and move-to-swap functionality that
komorebihas:Can you share a gif of the desired behaviour and one showing what happens instead when the script is run alongside
komorebi?@da-rth commented on GitHub (Sep 15, 2021):
@LGUG2Z I've attached a screenshot to further highlight the type of behaviour I have described above from a laptop I have running SwayWM:
I currently don't have access to my Windows machine but will upload a recording as soon as I can.
Some differences between the recording you have provided and the one I have posted above are:
In order to move windows around, you are selecting and dragging the window title bar. With the script, you can simply hold Alt+LMB anywhere above a window to move it around.
In order to resize windows, you are going to the edge of a window and selecting/dragging the resize cursor. Whereas, this script allows you to resize the window by simply holding Alt+RMB anywhere above the window and dragging the mouse left, right, up or down to resize the window.
i3, sway, bspwm and several other window managers have this kind of window dragging/resizing functionality, it would be fantastic to have it in
komorebi!@LGUG2Z commented on GitHub (Sep 17, 2021):
This would be pretty cool to have. This is quite a big feature and I don't think I will have the time to dedicate to it in the coming weeks/months.
The event emitted by the AHK script is this one, which is not currently mapped to a
WindowManagerEvent: https://github.com/LGUG2Z/komorebi/blob/master/komorebi/src/winevent.rs#L125I tried mapping it to
MoveResizeEnd(https://github.com/LGUG2Z/komorebi/blob/master/komorebi/src/window_manager_event.rs#L113) to get the AHK script working, and while it does, kinda, it forces too many redraws which makes the system crawl to a halt.This feature would definitely be better built into
komorebithan triggered via an AHK script.For anyone who would like to try working on this, I would suggest something like this as a starting point:
komorebiccommand each for toggling easy resizing and easy moving mode, which could be bound to key presses up and down, which map to an enum which stores start and end cursor position in the WindowManager state@rottakore commented on GitHub (Oct 29, 2024):
The problem is not in komorebi or any other WM, the problem is in the AHK script you are using which does not send information back to the system when it started/finished moving, also is the same problem with AltDrag and AltSnap.
@Gxnum commented on GitHub (Nov 18, 2024):
#32 AltSnap is now compatible with Komorebi (haven't tested it myself yet)
@LGUG2Z commented on GitHub (Nov 18, 2024):
Closing as AltSnap has been updated to support komorebi now 🎉