Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request to enable notifications on Windows #6

Open
mcejalvo opened this issue Jun 26, 2020 · 1 comment
Open

Feature Request to enable notifications on Windows #6

mcejalvo opened this issue Jun 26, 2020 · 1 comment

Comments

@mcejalvo
Copy link

I would be more than happy to help here but I would need some guidance.

@krassowski
Copy link
Owner

krassowski commented Jan 29, 2021

One could try to use win10toast (pip install win10toast) although it is not currently maintained:

from jupyter_helpers.desktop_integration import DesktopIntegration


class WindowsIntegration(DesktopIntegration):

    def notify(self, title, text, notify_id=None, show_again=True, urgency='normal'):
        from win10toast import ToastNotifier
        toaster = ToastNotifier()
        toaster.show_toast(title, text)

    def notify_close(self, notify_id):
        pass

and then:

from jupyter_helpers.notifications import Notifications

Notifications(
    success_audio='path/to/beep-07.wav',
    time_threshold=2,
    failure_audio='path/to/beep-05.wav',
    integration=WindowsIntegration
)

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

No branches or pull requests

2 participants