Skip to content
This repository has been archived by the owner on Dec 10, 2022. It is now read-only.

Conky Manager did not detect the 1.10 conky config files. #2

Open
NoobieNewb opened this issue Jun 30, 2017 · 6 comments
Open

Conky Manager did not detect the 1.10 conky config files. #2

NoobieNewb opened this issue Jun 30, 2017 · 6 comments

Comments

@NoobieNewb
Copy link

NoobieNewb commented Jun 30, 2017

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?

@teejee2008
Copy link
Owner

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.

@NoobieNewb
Copy link
Author

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?

@tflori
Copy link

tflori commented Nov 9, 2017

hum I need this too 😢

@zcot
Copy link

zcot commented Mar 6, 2018

@NoobieNewb @tflori there it is, detection, and basic edit and save support: #3

@zudalGT
Copy link

zudalGT commented Sep 5, 2018

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

can help me ?

@zcot
Copy link

zcot commented Sep 7, 2018

@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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants