You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
notify2 works great on Linux distros, but it fails to run on Mac OS. I propose to create a wrapper, like the legacy pinger.py, that checks on what OS we are. If we are on Linux, just use notify2. If we are on a Mac, use pync.
This wrapper would just go in the tools directory. All if-else-statements are encapsulated there, so we can just run it from bubblec.py without having to put the if-else there.
We need some a dev testing this implementation. Pinging @Wouter92....
The text was updated successfully, but these errors were encountered:
Good idea, but I wouldn't put it in the tools dir; that would screw up cohesion as tools would become a bunch of unrelated things. It should on the contrary be a bunch of common things that are useful for more then a single communicator
Basically, buublec.py could declare some (sub)class MacBubbleCommunicator or so and the factory is responsible for creation, so it could check the os and act accordingly. This will be completely transparent :-)
Note: this approach maybe requires declaring the MacCommunicator in a separate file, so that it can use lazy importing as discussed here (bottom)
Yep that would be the idea more or less I think, but import the corresponding communicator just before returning (to avoid having to import macCommunicator when not on mac and vica versa)
GijsTimmers
changed the title
Create a OS-specific wrapper for notifications in --bubble mode.
Create an OS-specific wrapper for notifications in --bubble mode.
Feb 16, 2015
notify2
works great on Linux distros, but it fails to run on Mac OS. I propose to create a wrapper, like the legacypinger.py
, that checks on what OS we are. If we are on Linux, just usenotify2
. If we are on a Mac, usepync
.This wrapper would just go in the tools directory. All if-else-statements are encapsulated there, so we can just run it from
bubblec.py
without having to put the if-else there.We need some a dev testing this implementation. Pinging @Wouter92....
The text was updated successfully, but these errors were encountered: