brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.17k stars 615 forks source link

Lua functions in .conkyrc #149

Closed leahneukirchen closed 5 years ago

leahneukirchen commented 9 years ago

Since 1.10 .conkyrc is a lua file, but it seems custom functions still need to be defined in a seperate file and loaded with lua_load, wouldn't it make sense to define them in .conkyrc already?

lasers commented 6 years ago

@plikhari may be able to answer this question. He's a black belt in using Lua scripts in conky. :crossed_swords:

plikhari commented 6 years ago

it seems custom functions still need to be defined in a seperate file and loaded with lua_load, wouldn't it make sense to define them in .conkyrc already?

It is simply not a good idea to imbed LUA scripts inside a configuration section as this will most likely make the config section in .conkyrc file very difficult to parse.

lua_load is like an import statement within the config section.

Trust this answers your query.

lasers commented 6 years ago

@plikhari Thanks for the good explanation.

@chneukirchen I'm here to close issues. The person who implemented nice Lua support in conky hasn't been active on GitHub. I don't know the reasons, but I'll ping @labath to see if we can get a response and/or a pull request to remedy this issue. If nothing, we can close this in a month.

Trust this satisfies your question.