This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/system/bin/sh | |
| max_usage=900000000 #in bytes | |
| total_usage=0 | |
| function print_notification() { | |
| su -lp 2000 -c "cmd notification post -S bigtext -t 'Data Usage' 'Tag' '$@'" &> /dev/null | |
| } | |
| function get_interface() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/data/data/com.termux/files/usr/bin/bash | |
| su -c settings get global airplane_mode_radios | grep wifi && { | |
| echo "Excluding WI-FI from AIRPLANE MODE." | |
| su -c settings put global airplane_mode_radios "cell,bluetooth,nfc,wimax" | |
| # cell,bluetooth,wifi,nfc,wimax | |
| } | |
| interface="ccmni0" | |
| total_usage=0 |