</term>
<listitem>Executes a Lua function with given parameters,
then prints the returned string. See also 'lua_load' on how
- to load scripts.
+ to load scripts. Conky puts 'conky_' in front of function_name
+ to prevent accidental calls to the wrong function unless you
+ put you place 'conky_' in front of it yourself.
<para /></listitem>
</varlistentry>
<varlistentry>
<listitem>Executes a Lua function with given parameters and
draws a bar. Expects result value to be an integer between
0 and 100. See also 'lua_load' on how to load scripts.
+ Conky puts 'conky_' in front of function_name to prevent
+ accidental calls to the wrong function unless you
+ put you place 'conky_' in front of it yourself.
<para /></listitem>
</varlistentry>
<varlistentry>
<listitem>Executes a Lua function with given parameters and
draws a gauge. Expects result value to be an integer
between 0 and 100. See also 'lua_load' on how to load
- scripts.
+ scripts. Conky puts 'conky_' in front of function_name
+ to prevent accidental calls to the wrong function unless you
+ put you place 'conky_' in front of it yourself.
<para /></listitem>
</varlistentry>
<varlistentry>
load scripts. Takes the switch '-t' to use a temperature
gradient, which makes the gradient values change depending
on the amplitude of a particular graph value (try it and
- see).
+ see). Conky puts 'conky_' in front of function_name
+ to prevent accidental calls to the wrong function unless you
+ put you place 'conky_' in front of it yourself.
<para /></listitem>
</varlistentry>
<varlistentry>
<listitem>Executes a Lua function with given parameters as
per $lua, then parses and prints the result value as per
the syntax for Conky's TEXT section. See also 'lua_load' on
- how to load scripts.
+ how to load scripts. Conky puts 'conky_' in front of function_name
+ to prevent accidental calls to the wrong function unless you
+ put you place 'conky_' in front of it yourself.
<para /></listitem>
</varlistentry>
<varlistentry>
}
/* call only conky_ prefixed functions */
- snprintf(func, 64, "conky_%s", ptr);
+ if(strncmp(ptr, LUAPREFIX, strlen(LUAPREFIX)) == 0) {
+ snprintf(func, 64, "%s", ptr);
+ }else{
+ snprintf(func, 64, "%s%s", LUAPREFIX, ptr);
+ }
/* push the function name to stack */
lua_getglobal(lua_L, func);