Favorite Formulas

While I have been using KLWP for some time now, I have only started to use the Favorite Formulas feature. So I am a newbie in this sense.

  1. Is there some way, independent of entering a formula for a global, that I can get at these? For example, to add, modify, delete? (from other reading, it seems like there is not a “real” way to do this and that is strange)

  2. Is there some way to access these when entering a formula inside of a flow?

I cannot seem to do either.

Thanks!

Meanwhile, since my devices are rooted, I went poking around in the Kustom app’s data and found this file /data/data/org.kustom.wallpaper/app_editor/fave_formulas.json which contains the stuff:

[

{

"expression": "$if(/*(nc(wifi) \u003d ENABLED | nc(wifi) \u003d CONNECTED)*/ (gv(connect) \u003d WIFI | gv(connect) \u003d VPN) \u0026 (gv(IsOnline) \u003d t), 1, \"\")$",

"description": "Is Connect Wifi Or VPN"

},

{

"expression": "$if(nc(wifi) \u003d ENABLED | nc(wifi) \u003d CONNECTED, Wifi, if(sh(\"su -c ifconfig tun0 \u003e /dev/null; echo $?\") \u003d 0, VPN, if(nc(cell) \u003d DATA, Cell, None)))$",

"description": "Connection Type"

}

]

So it MIGHT be possible to do some work directly in that file. If so, it would likely be needed to kill the editor first and syntax may prove tricky as some stuff is clearly stored as unicode.

And with this, I could at least copy/paste (along with at least some unicode translation manually) into flows.

Obviously, this requires root and is clearly an ugly hack. So not for everyone.

Perhaps it is just because I am new to this feature but I really think the editor should permit more direct add/change/delete for these favorites.

You can already delete any formula easily—there’s literally a trash can icon right next to each one in the list.

While there is no direct ‘edit’ button, the workaround is simple: just tap the formula to insert it, make your changes, delete the old one using the trash icon, and save the new version. That’s all there is to it.

As for the Flows issue, that’s just a UI limitation on the developer’s end. No need to mess with root or JSON files for this.

2 Likes