Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Adaptable for linux? #10

Open
matlink opened this issue Apr 26, 2016 · 5 comments
Open

Adaptable for linux? #10

matlink opened this issue Apr 26, 2016 · 5 comments

Comments

@matlink
Copy link

matlink commented Apr 26, 2016

As PushAlotAuth is quite content weak and seems abandoned, do you think this project can be adapted for linux-based systems? I can see that the notification script is made for OSX, then I think is hackable for linux.

@pirate
Copy link
Owner

pirate commented Apr 26, 2016

Yes it certainly can be, in fact I tried to make it as cross-platform as possible. The only mac-specific part currently is the osxnotifiactions.py logger.

The only major thing that needs to be done is to make a menubarlet for Linux that displays the output of menubar.sh, and passes click events as the text of the item clicked as an argument, e.g.
./menubar.sh "Settings...".

I personally don't use desktop linux for day-to-day work, so I don't have the time to invest in making a Linux version, but feel free to fork/submit a pr!

@nmaggioni
Copy link

Integration with Gnome's notifications is possible (as per Arch Wiki and Gnome's specs, or the relative bindings docs), and in fact I've achived it with the attached patch.

The scripts starts and produces notifications, but I noticed another important problem: parsing the system's logs. For example I use systemd, and reading the system's logs is only possible by piping the output of the journalctl command; it isn't possible to just read a file as the script is currently doing.

Anyway, this patch might be a good starting point for whoever wants to work at this port.

gnome_patch.txt

@pirate
Copy link
Owner

pirate commented May 1, 2016

Thanks for this patch!

I'd rather have the gnome notification be a seperate logger rather than overload osxnotifications.py. The platform detection can actually happen inside of settings.py, which then just sets the proper logger list on app launch.

As for the systemd problem, it's not an issue at all, we can simply add a new logger source and specify the output of popen('journalctl').readline() as the source of new lines instead of a file.

@nmaggioni
Copy link

Great suggestion, I didn't consider it. My Python-fu is rusty...

I'll look into this and eventually begin working on a proper PR, what do you reckon?

@pirate
Copy link
Owner

pirate commented May 1, 2016

Thanks! I probably wont have time to tackle full linux support myself in the near future, but if you submit a PR for a prototype, I'd be happy to help test/refactor/bugfix it.

Always happy to answer any questions as well, shoot an email if you want.

@pirate pirate modified the milestone: v3.0 May 2, 2016
@pirate pirate moved this from Long-Term Backlog to Next-Up in Development May 7, 2017
@pirate pirate moved this from Next-Up to Backlog in Development May 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

No branches or pull requests

3 participants