I’m currently working on customizing my Android setup using KLWP, and I’m having difficulties with formulas to display VPN connection status. I’ve tried several formulations based on suggestions, but encountered errors such as not displaying as expected, staying blank even when connected to VPN, or consistently showing “VPN activated” regardless of the VPN status.
Here are three formulas I’ve attempted:
$if(sh("ifconfig tun0", 1) = "ifconfig: tun0: No such device", "", "🔒")$
I would appreciate any insights or suggestions to improve these formulas and correctly reflect the VPN connection status in KLWP. Thank you in advance for your help!
Thank you so much for your assistance! I sincerely appreciate your help.
I struggled not only with KLWP but also with Tasker, almost reaching the point of giving up.
The formula you provided worked flawlessly. I’m not an expert in any of these, but your guidance using package names for accurate status results made all the difference.
I am grateful for your expertise!
Here’s what I’m using to complement yours:
‘$if(ni(pcount, com.celzero.bravedns) > 0, “Connected to DNS + Firewall”, if(ni(pcount, org.torproject.android) > 0, “VPN Connected”, “Not VPN Connected”))$’