safeeyes / safeeyes-plugins

Thirdparty plugins for Safe Eyes
http://slgobinath.github.io/SafeEyes/
GNU General Public License v3.0
14 stars 6 forks source link

Hack to hide notifications while in Zoom meetings #6

Closed hashstat closed 2 years ago

hashstat commented 3 years ago

This is definitely a hack. That's why it is all wrapped inside a try...except block. I understand if the PR is rejected.

A possible solution might be to provide a method to indicate the order of plugins or, even better, the order of individual plugin hooks. The simplest might be a decorator to specify dependencies:

# plugin.py
from safeeyes.ordering import order

def init(...):
    ...

@order(before=['notification'])
def on_pre_break(break_obj):
    ...

@order(after=['donotdisturb'])
def on_start_break(break_obj):
    ...
slgobinath commented 3 years ago

Hi, Sorry for the late reply. I am working on Safe Eyes 3.0.0 with a new set of APIs for plugins. The new API handles this in a different way. I am working on wiki page. I will let you know once it is ready so that you can implement this using the new API.