WISH: pop-up based on object type

I wish it was possible to set the pop-up with middle-mouse-button differently based on selection (object type) and default when there is no selection.

Can I implement this currently somehow?
Running an event watcher?

Thanks in advance.