D3SOX / Better-Network-Tiles-Libre

Bring back Wi-Fi, mobile data and add even more useful tiles on Android 12+ (Libre version)
GNU General Public License v3.0
18 stars 0 forks source link

[Feature Request]: Option to run custom shell script(s) on mobile / wifi / airplane mode toggle #11

Open bitandquit opened 1 month ago

bitandquit commented 1 month ago

First,

Thanks for your continued work on this project.

Feature request: Would you consider providing an option to run a custom script on mobile, wifi and airplane mode state change? Ideally the call to a user-script could also pass new mobile_data_state, wifi_state, airplane_state .

Why? I run dnscrypt-proxy on my phone but when in airplane mode, I want to suspend/stop the service so the service does not keep trying to renew certificates. As of now, it is very difficult to detect network state without registering a callback to ConnectivityManager.

I can accomplish this right now by adding my script to this source code and building the APK, but I think everyone would benefit from this feature.