Skip to content

feat: add bar mouse exit event - #5280

Open
jvasile wants to merge 1 commit into
Alexays:masterfrom
jvasile:on-mouse-exit
Open

jvasile wants to merge 1 commit into
Alexays:masterfrom
jvasile:on-mouse-exit

Conversation

@jvasile

@jvasile jvasile commented Aug 28, 2026

Copy link
Copy Markdown

What does this PR do?

Expose GTK leave notifications as the generic top-level on-mouse-exit bar option. Register the leave event mask on the Waybar window when configured and execute the configured command from Bar::handleMouseLeave.

This is useful for hiding the bar when the pointer leaves the entire bar:

"on-sigusr2": "HIDE",
"on-mouse-exit": "kill -USR2 \"$PPID\""

Coupled with waycorner to activate the bar on mouse y=0, I have a waybar that behaves pretty well.

Related issues

Checklist

  • Code is formatted with clang-format
  • Builds locally (ninja -C build)
  • Man page updated for any new/changed user-facing option (man/)
  • Tested against the affected module(s)

Expose GTK leave notifications as the generic top-level on-mouse-exit
bar option. Register the leave event mask on the Waybar window when
configured and execute the configured command from
Bar::handleMouseLeave.

This is useful for hiding the bar when the pointer leaves the entire
bar:

```
"on-sigusr2": "HIDE",
"on-mouse-exit": "kill -USR2 \"$PPID\""
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant