Yep, it seems to work and is only 0.002-0.003 seconds slower than the current implementation. That seems quite acceptable.
Maybe this is a bit faster, 0.004-0.012 s.
#!/bin/dash eval $(xdotool getmouselocation --shell) [ $WINDOW = $(xdotool search --limit 1 --class Bspwm) ]
There is an unusual behavior with
gapgrab: when I left-click on empty desktop (with no windows), cursor jumps to the upper left corner of the screen. It might prove handy, because I can quicly open panel menu with the second click, it is just a bit unexpected.
EDIT. Maybe add a check if there is any focused window to prevent this behavior?
focused="$(bspc query -N -n focused)"; [ "$focused" ] || exit IFS=" " read -a window <<< $(wattr whxy $focused)
That might be good. One useful alternative would be to spawn rofi on empty desktop, but that is even more unexpected.
Updated the root menu. Also updated bspwm-minimal iso in sourceforge. It now has rofi based menus and gap drag enabled.
I wrote a script to use application menu categories with rofi.
A post was split to a new topic: Rofi freezes