Skip to content

Register indicator action as secondary activation target#331

Open
dshoreman wants to merge 2 commits intov1cont:masterfrom
dshoreman:indicator-actions
Open

Register indicator action as secondary activation target#331
dshoreman wants to merge 2 commits intov1cont:masterfrom
dshoreman:indicator-actions

Conversation

@dshoreman
Copy link
Contributor

@dshoreman dshoreman commented Feb 26, 2026

The new --indicator mode works great with Waybar, but it always creates an "Activate" and "Quit" item - even if you already have your own. This PR brings behaviour closer to the notification mode:

  • Removes activate/quit menu items
  • Sets the icon's secondary activate target to trigger action on middle click
  • Defaults to quit if action and --no-middle are both undefined

If you'd rather keep a default Quit menu item, I have another commit to push - just say the word.
It would avoid duplication (essentially add-unless any d.action == ('quit' || 'kill *'), but it can't support "no quit". For that it'd need a new option like --no-quit-item so it's probably easier to keep letting users add it.

Replaces the "Activate" menu item with a secondary target that
calls the `action`/`--command` when middle-mouse is clicked.
Restores middle-click-quit by default (unless `--no-middle` is set) and
removes the automatic Quit menu item to restore original --notification
behaviour and avoid existing menus getting duplicated Quit items.
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