I'm trying to make a GNOME extension that functions similarly to a dock, except it shows you status info (time, battery, etc). What I'm stuck on here is, how do I get the info to show up when the cursor enters a specific pixel area? Like, if the screen is 1600x900 pixels (just an example), it should activate when x>1550
and 800>y>850
. That's not the actual pixel range, but something in that general area. My question is, how can I make it so that it checks often for whether or not the cursor is in that area? I could just do a while loop, but I think that would be resource-heavy and there must be a better way. Is there? So far I've looked both at other extensions as well as online for APIs, but it seems that I can't find anything that could be of use. I saw this one thing about a mainloop which looked promising, but I didn't really understand it.
Thanks in advance!