IPC event for window mouse move/resize

New to hyprland and really like it, especially how easy and powerful it is to customize using hyprctl and IPC events!

What I’d like to do is make floating window transparent while I move or resize it with the mouse. Conceptually what I’d like to do is:

  1. on window move / resize start, save current opacity then set it to 50%
  2. on window move / resize end, restore saved opacity

I see the activewindow and activatewindowv2 events are fired when the mouse button is clicked / released but can’t find an easy way to get the mouse button state. Any suggestions?

Interesting & challenging.

Quickshell maybe? Take a look here and specifically signals.

Thanks, took a look at Quickshell but I don’t think that’d work.

I saw in the Hyprland source code these functions:

onBeginDragWindow
onEndDragWindow

Would it be possible to add a feature request to have it emit events via calling g_pEventManager->postEvent to indicate drag begin and drag end?

hm, wouldn’t it be better to add this as a windowrule selector?