-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global mouse entered and exited events #178
Comments
With the current capabilities this is not possible in a non janky way I think. The way this could be approached internally is to create a new event that triggers when the mouse moves out of all sketchybar windows. However, this has the potential to be a bit confusing since there is already the If nothing better comes to mind we could go with the two new events:
Then you could simply subscribe to the Would this fix your problem? btw: The video gave me quite a good laugh |
Yeah it would be quite nice to have something like this. And with |
oh nice! looking forward to it, thanks for the update! |
I have implemented this feature here 5531582 in the drawing rewrite branch. Once the pull request for this rewrite #191 is merged it will become available on the master branch. The events are called: So as it is currently you can have the bartender like items appearing when the mouse enters, however, still problematic is the use case you described with the mouse going off to a popup. I will include an additional check to see if the mouse is over a popup when it leaves the bar and only fire the |
Since 20c3326 popups are respected in the global mouse exited event and the event will only trigger once both the bar and all popups are left. Additionally I have made it such that the events.mp4 |
Hey, i've only been able to test now, works perfectly! |
What i want to achieve is to be able to hover over an item and select something from the popup menu.
Right now when when my mouse exits the item and enters the popup, popup goes away naturally as i bound mouse.exit to close the popup.
Is there a way i can let the popup close when mouse exits the item to sides for example but not when mouse goes over the popup?
I have this for example:
and the script has:
in.mov
I guess one option for me could be to have popup items bound to another script (currently click_script is an
open
command with a link for popup items) and enable drawing there as well, but this will be messy and it could cause a flicker (didn't try this).Or i could hold a system-wide state somewhere to decide when to properly toggle the popup menu, but it'll be still ugly.
Sharing the issue in case you might see a value on having some sort of internal functionality for this.. However i don't see how this could be implemented in a nice way internally as well.
edit: ah maybe i can use brackets with a seperate script for hover, let's see
edit2: ok i don't think brackets support either scripts or mouse events
The text was updated successfully, but these errors were encountered: