I bought LLX a couple of days back, and am liking the dynamic text functionality.

I bought LLX a couple of days back, and am liking the dynamic text functionality. But I’ve got a little suggestion for power users. Would it be possible to have an option for dynamic text which is the output of a command or, failing that, which will be the content of (or first line of) a file?

For example, I could specify 

/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

to get the current CPU frequency as a dynamic text.

]]>

9 Commentsto I bought LLX a couple of days back, and am liking the dynamic text functionality.

  1. Anonymous says:

    < ![CDATA[

    I think its easier to integrate tasker variables in the dynamic text.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    You are opening the Pandora’s box 😉



    In combination with this http://developer.android.com/reference/android/os/FileObserver.html, it would open up a lot interesting things…


    I need to think at this a bit because it has a fair number of implications.


    Command and file are different options:


    – command would need a refresh setting and would only need to get the output unparsed (formatting would be done in the command itself I think)


    – files won’t need a refresh thanks to inotify, but maybe would need some sort of pattern to extract data from non formated content (for instance /proc/stat)

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Vincent Van Deuren  I’m not sure I’d be happy with Tasker variables – I currently don’t use Tasker. For a while I used Llama, and I’m now using something I wrote myself which allows scripting of events in lua (must release this at some point). The point being it would tie LLX tightly to just one of several options.



    Pierre Hébert with  the pattern matching idea you mentioned, I’d be more than happy with a file, I think. I suggested running a command, but that was mainly to allow for pre-processing of data. But that raises the bar a bit further for general users (as in, we can swap “recipes” for useful dynamic text quite easily if it’s just a pattern match on a named file – not so easy if people have to upload scripts to their phones).



    Would a filename and a bracketed regular expression be the way to go, perhaps?



    Incidentally, for my example above, I’m not sure that inotify would work, /sys and /proc being a bit special. You might need a polling interval in any case!

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Re: sysfs and procfs, it appears the answer is “maybe”:



    http://inotify.aiken.cz/?section=inotify&page=faq&lang=en

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Yes regexp would be the way to go, I won’t implement something better myself, and as this is a feature for advanced users (well, we may say developers…) simplicity of the pattern is not the primary goal or issue.



    I wasn’t aware of limitations with procfs but since nowadays devices run relatively recent kernel versions, it might be that the support is becoming good enough.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Regarding external apps like Tasker or Llama I agree with you. I don’t want to link the feature to a specific app, but as of today there is nothing generic yet.


    You mentioned lua : just by curiosity because I am wondering what and how LL could be scripted : are you embedding it using jni or as a standalone shell ?

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Pierre Hébert I used the “LuaJava” embedding (http://www.keplerproject.org/luajava/). There’s a very good example available at https://github.com/mkottman/AndroLua which shows how to register Java functions to be available from Lua and how to do callbacks from Lua to Java methods.



    LuaJava is released under a very permissive license so I think there would be no problem in using it within LL.

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Thinking a bit more about lua – if you did integrate that then presumably you could just delegate some dynamic text to a regularly-called lua function and not bother with file monitoring, regular expressions etc…

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Actually, this might be the next big thing. But this will require a lot of thought before I really start working on it. There are a lot of use cases, this is invasive, and I need to take some inspiration from what others are doing.


    Insane or not, I feel like it has to be done anyway. I just need to make sure that I am not building another runtime on top of the Android framework, lol !

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *