zcot / conky-manager2

Fork of GUI for managing Conky widgets. Support added for latest conky config version, and works with Ubuntu 16-22, Mint 18-21 and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a way to hide .lua scripts from conky manager 2?

AndersonGI opened this issue · comments

This is more a question than a issue. I have some conkys that uses .lua scripts. Besides those conkys files, conky manager also show some .lua files, but (as espected) does not load/show anything. I wish to remove those .lua from the list.

commented

I do think this is possible, but it becomes tricky, here's why:

A .lua support file is NOT included in the listing by itself, but a properly formatted conky config file that happens to be using the .lua extension IS. Well, ANY extension file will be listed if it does include a marker for a main config file.

So, the current condition should be that you are not seeing any file that "does not load/show anything". It might be that you have to correct the config for it to run in the first place? We might have to dig deeper into the specific details there.

One example is the provided "seamod" package. Check in that directory and we have conkyrc.lua and seamod_rings.lua. But only conkyrc.lua is showing in the manager because it has the properly formatted marker for a main config file.

I have maybe 100 .lua files in my directories and the only 1 that shows up in the manager is that one conkyrc.lua file.

What constitutes the file to be listed in the first place is that it follows the structure of a legitimate conky config.

The original code that TeeJee did would parse all the files for the TEXT marking. And I've added code that will also include a file if it contains the conky.text markup. This is pretty basic, and probably certainly why unwanted files could be included at times. See the commit here: 051d69e

I'll take a look at this parser and check about some other ways to further limit the inclusion of a file.