Skip to content

Popup events(mouse) #629

Answered by Pe8er
gldtn asked this question in Q&A
Oct 3, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

I have a similar setup to yours, with the following differences. Try them, maybe it will work for you?

  1. In item script:

Remove line click_script="sketchybar --set weather popup.drawing=toggle"

Subscribe to mouse.clicked:

--subscribe weather mouse.entered mouse.exited mouse.exited.global mouse.clicked \

  1. And then in the plugin script:
popup() {
  sketchybar --set "$NAME" popup.drawing="$1"
}

case "$SENDER" in
"mouse.entered")
  popup on
  ;;
"mouse.exited" | "mouse.exited.global")
  popup off
  ;;
"mouse.clicked")
  popup toggle
  ;;
esac

If you want to take a peek:

https://github.com/Pe8er/dotfiles/blob/master/config.symlink/sketchybar/items/weather.sh
https://github.com/Pe8er/dotfile…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gldtn
Comment options

@Pe8er
Comment options

Answer selected by gldtn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants