Some time ago Hyprland added touch gestures for workspace swipe, so now we can use the slightly less hacky internal APIs for our own.
The new workspace swipe should be implemented using: g_pInputManager->beginWorkspaceSwipe, updateWorkspaceSwipe and endWorkspaceSwipe. These are private methods so the following hack needs to be used:
#define private public
#include <hyprland/src/...>
#undef private
(even the official hyprexpo plugin does this so don't think about it)
Some time ago Hyprland added touch gestures for workspace swipe, so now we can use the slightly less hacky internal APIs for our own.
g_pInputManager->beginWorkspaceSwipe
,updateWorkspaceSwipe
andendWorkspaceSwipe
. These are private methods so the following hack needs to be used:(even the official hyprexpo plugin does this so don't think about it)
Take a look at how the gestures are handled in https://github.com/hyprwm/Hyprland/blob/main/src/managers/input/Touch.cpp
in hyprgrass, emulateSwipeBegin would be a good place to start