Smart togglesplit

Hyprland version
Hyprland 0.51.1 built from branch  at commit 71a1216abcc7031776630a6d88f105605c4dc1c9  ([gha] Nix: update inputs).
Date: Mon Sep 22 20:54:03 2025
Tag: v0.51.1, commits: 6436
built against:
 aquamarine 0.9.5
 hyprlang 0.6.3
 hyprutils 0.10.0
 hyprcursor 0.1.13
 hyprgraphics 0.2.0


no flags were set

Currently, togglesplit will always swap windows in the same direction (top<->left, right<->bottom). I would love a smart togglesplit (similar to smart_split) that will toggle based on where the mouse is in the current window. Let’s say I have 2 windows side by side, and I hold the mouse on the upper part of one of the windows, that window should be now on top after executing togglesplit, and similarly, if I hold it in the bottom of the window, that window should end up on the bottom. Effectively, the current window remains focused after the toggle.