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

Remove GTK dependencies #11

Closed
m3h opened this issue Jul 14, 2021 · 2 comments
Closed

Remove GTK dependencies #11

m3h opened this issue Jul 14, 2021 · 2 comments
Assignees

Comments

@m3h
Copy link
Owner

m3h commented Jul 14, 2021

Related to #4

Currently, there are some GTK dependencies in the main loadshedding.py script.

from gi.repository import Gtk
import notify2
main()

Now it's been a while since I took a look at this code, but if I recall correctly, the GTK dependency existed purely to be able to cancel the notifications, and cancel the shutdown/script execution.

I just had a look, and the notify2 package is deprecated (https://web.archive.org/web/20210714093727/https://notify2.readthedocs.io/en/latest/), so that dependency also needs to be removed.

But I really liked the ability to cancel the action as a user on GUI systems, so I want to keep it in.

@m3h
Copy link
Owner Author

m3h commented Jul 14, 2021

So I haven't found a platform-independant notification library that allows for actions.
I might go the kind of clunky, but quite workable solution of using PySimpleGUI (https://pysimplegui.readthedocs.io) and loading up a GUI Window with some buttons and a timeout instead.

@m3h
Copy link
Owner Author

m3h commented Jul 14, 2021

Some further research seems to indicate that tk/tcl is included with standard Python installations.
That would be the preferred option, to keep the dependencies lean.

@m3h m3h self-assigned this Jul 14, 2021
@m3h m3h mentioned this issue Jul 21, 2021
@m3h m3h closed this as completed Jul 25, 2021
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

1 participant