SketchyBar icon indicating copy to clipboard operation
SketchyBar copied to clipboard

mouse.exited and mouse.exited.global not properly triggered?

Open aspauldingcode opened this issue 3 weeks ago • 2 comments

Having issues keeping my popup drawing set as off when mouse has exited the apple item. in my apple.sh:

# Handle mouse events
case "$SENDER" in
  "mouse.entered")
    sleep 2  # Wait for 2 seconds before showing the popup
      sketchybar --set $NAME popup.drawing=on
    ;;
  "mouse.exited" | "mouse.exited.global")
    sketchybar --set $NAME popup.drawing=off
    ;;
  "mouse.clicked")
    sketchybar --set $NAME popup.drawing=toggle
    ;;
  "routine")
    ;;
esac

I wanted to add a nested if statement which double checks after 2 seconds if I am still hovered on the item, before setting the popup drawing=on.

However, the code above doesn't do this, because if I add the nested for loop it seems to still think it's hovered. I'm not exactly sure how to approach this.

aspauldingcode avatar Jun 12 '24 09:06 aspauldingcode