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

Action Result Notification #77

Closed
wants to merge 1 commit into from
Closed

Action Result Notification #77

wants to merge 1 commit into from

Conversation

anwareset
Copy link

@anwareset anwareset commented Apr 17, 2020

Answering a feature request from rien333
#64

If you use Dunst to manage notifications, this will work.

To be known:

  1. Notifications will be run using the notify-send command
  2. Currently only applies to wireless connections

This is not final, but I think it will be fun and stimulating us to develop it for other adapters such as ethernet, modem, to VPN.

Preview:
preview

Answering a feature request from rien333
#64

If you use Dunst to manage notifications, this will work.

To be known:
1. Notifications will be run using the notify-send command
2. Currently only applies to wireless connections

This is not final, but I think it will be fun and stimulating us to develop it for other adapters such as ethernet, modem, to VPN.
@firecat53
Copy link
Owner

firecat53 commented Apr 21, 2020

Thanks for starting on this! I think instead of sending the notification as soon as the action is initiated, we need to check that the action is actually completed before sending the notification. Obviously this is much more complex, but it meets the intent of the notifications better (#64), especially when the connection to a network fails.

For example: this call for activating an existing connection has the ability to add a callback function for when the connection is complete. This is already done with verify_conn which is the callback function I used in set_new_connection() to check if the new connection is added and activated correctly.

Putting the notifications inside those callback functions would I think be the best way to proceed.

@anwareset
Copy link
Author

anwareset commented Apr 21, 2020

you are right, this is much more complex.

Do I need to create new custom callback function for this?

I don't know how to pass adapter and nm_ap from process_ap() to new callback function for deactivate_connection_async() and activate_connection_async()

I hope you can give me some enlightenment, I'm new in Python.

@firecat53
Copy link
Owner

Pushed 185e782 to the develop branch that closes this PR. We can continue discussion in #64. Thanks for getting me started on this!

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

Successfully merging this pull request may close these issues.

2 participants