conky-manager icon indicating copy to clipboard operation
conky-manager copied to clipboard

Conky Manager did not detect the 1.10 conky config files.

Open NoobieNewb opened this issue 8 years ago • 6 comments

Specifically, in the find_conkyrc_files_in_path() function in Main.vala:

string cmd = "grep -r "^[[:blank:]]TEXT[[:blank:]]$" "%s"".printf(path);

only detects config files below 1.10. 1.10 config files uses the lua syntax, which is:

conky.config = { *settings* }; conky.text = [[ *text* ]];

However, config files below 1.10 is still compatible with Conky 1.10, so maybe an additional if-statement would be an adequate fix?

NoobieNewb avatar Jun 30 '17 11:06 NoobieNewb

I haven't looked into the new lua syntax, so I'm not sure if this change will be enough. Try making the change and see if it works.

teejee2008 avatar Jun 30 '17 13:06 teejee2008

Unfortunately, I'm not well versed in either Vala or grep regex.

I only managed to find the appropriate function because of how neatly written it is.
I was thinking that since only 1.10 users that are concerned about this, maybe an if statement that checks the installed conky version would do, something like:

 

if (conky_version > 1.9) {        //check for all config files, maybe like:        string cmd = "grep -r "^[[:blank:]]TEXT[[:blank:]]$ | conky.config{[[:blank:]]}$" "%s"".printf(path); } else {        //only check for config files below 1.10        string cmd = "grep -r "^[[:blank:]]TEXT[[:blank:]]$" "%s"".printf(path); }

But I have no idea how to get the conky version.
In Main.vala, there's App.desktop that returns the name of the desktop environment, maybe there's something like that that I was unaware of?

NoobieNewb avatar Jun 30 '17 22:06 NoobieNewb

hum I need this too :cry:

tflori avatar Nov 09 '17 22:11 tflori

@NoobieNewb @tflori there it is, detection, and basic edit and save support: https://github.com/teejee2008/conky-manager/pull/3

zcot avatar Mar 06 '18 01:03 zcot

hey why i cant load my conky lua on conky manager v2.4

can help me ?

zudalGT avatar Sep 05 '18 18:09 zudalGT

@zudalGT follow previous comment, you can load/edit/save 1.10 conky configs. This addition can be seen as a forked branch here(easy to install and usage is the same): conky-manager2 (v2.5)

zcot avatar Sep 07 '18 04:09 zcot