-
-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exec doesn't run on first iteration #112
Comments
Even worse, in cases where conky is only run once:
(e.g. the display-loop is executed by a containing program), there is no output at all. |
I can confirm this behaviour also for use-cases where conky's output is piped into a bar like dzen. There, when restarting/reloading conky, the old/original output of the {t}exec{i} sequences is still being displayed… |
I am also having this issue... |
I can also confirm this issue. This bug prevents a number of simple use cases: a volume bar popup, for example, should be a single execbar iteration (total_run_times=1) with a duration of a second or so (update_interval=1). To get the same behavior (because of this bug) you need a very tight update interval with a large number of iterations so the initial empty bar isn't visible. I dug into this a bit but lost track of the control-flow of the callback system. |
The callback for Starting from
The ultimate purpose of I think we need some serious refactoring to make this work as intended. It isn't straightforward to move the |
Hi marcpayne |
No, unfortunately. I recently started training for a new job and have not had time to work on this issue. I will put in some time during the holidays and try to come up with a solution. |
I think I have a decent solution now. I decided to push the changes to my repo, but not submit a pull request yet. If anyone here is willing to test, please do and let me know how it works for you. I'll be happy to help if needed. One thing I mentioned in my commit message is that |
Prior to this commit, exec_cb callbacks were registered and the results were immediately fetched on every update interval... except the first. Besides not working on the first update, this meant that all exec_cb callbacks were re-registered on every update, which was not efficient. The solution was to decouple the registration from the result retrieval and only register on the initial startup (or config reload). Now, the callbacks are registered when they are supposed to be, and the first-run issue is gone. The code is hopefully more understandable now. I consolidated several functions in exec.cc into one, which makes the logic much easier to follow. I also added plenty of documentation, both to the code itself and to the manpage. There are some nice bonuses as well: * execgraph works again! * optional execgraph parameters are now documented * execbar and execgauge now accept height and width parameters Known issues: * technically, execgraph accepts commands with spaces, but such commands will need to be surrounded with double-quotes and you might as well forget adding optional arguments like colors, as the results may not be expected. Just put your spacey command into a script and run the script instead so that everything will just work. * the execgraph command comes *before* its arguments, whereas the execbar and execgauge commands come after their arguments. * texec{i} is registered on startup like everything else, but sometimes it will not produce output on the first interval. This is an intermittent issue. Fixes the following issues: brndnmtthws#112 brndnmtthws#153 brndnmtthws#180
Closed by #192. Thanks. 👍 |
Need to do it manually. New version not completely backward compatible with old format. E.g.: double_buffer = yes --> crash! Using /usr/share/doc/conky-all/convert.lua New format from release 1.10.x Known issues in conky 1.10.x (2016): + if_match fail with locale: brndnmtthws/conky#20 + exec not work at first iteration: brndnmtthws/conky#112
Need to do it manually. New version not completely backward compatible with old format. E.g.: double_buffer = yes --> crash! Using /usr/share/doc/conky-all/convert.lua New format from release 1.10.x Known issues in conky 1.10.x (2016): + if_match fail with locale: brndnmtthws/conky#20 + exec not work at first iteration: brndnmtthws/conky#112
Need to do it manually. New version not completely backward compatible with old format. E.g.: double_buffer = yes --> crash! Using /usr/share/doc/conky-all/convert.lua New format from release 1.10.x Known issues in conky 1.10.x (2016): + if_match fail with locale: brndnmtthws/conky#20 + exec not work at first iteration: brndnmtthws/conky#112
Need to do it manually. New version not completely backward compatible with old format. E.g.: double_buffer = yes --> crash! Using /usr/share/doc/conky-all/convert.lua New format from release 1.10.x Known issues in conky 1.10.x (2016): + if_match fail with locale: brndnmtthws/conky#20 + exec not work at first iteration: brndnmtthws/conky#112
Need to do it manually. New version not completely backward compatible with old format. E.g.: double_buffer = yes --> crash! Using /usr/share/doc/conky-all/convert.lua New format from release 1.10.x Known issues in conky 1.10.x (2016): + if_match fail with locale: brndnmtthws/conky#20 + exec not work at first iteration: brndnmtthws/conky#112
Need to do it manually. New version not completely backward compatible with old format. E.g.: double_buffer = yes --> crash! Using /usr/share/doc/conky-all/convert.lua New format from release 1.10.x Known issues in conky 1.10.x (2016): + if_match fail with locale: brndnmtthws/conky#20 + exec not work at first iteration: brndnmtthws/conky#112
Need to do it manually. New version not completely backward compatible with old format. E.g.: double_buffer = yes --> crash! Using /usr/share/doc/conky-all/convert.lua New format from release 1.10.x Known issues in conky 1.10.x (2016): + if_match fail with locale: brndnmtthws/conky#20 + exec not work at first iteration: brndnmtthws/conky#112
Need to do it manually. New version not completely backward compatible with old format. E.g.: double_buffer = yes --> crash! Using /usr/share/doc/conky-all/convert.lua New format from release 1.10.x Known issues in conky 1.10.x (2016): + if_match fail with locale: brndnmtthws/conky#20 + exec not work at first iteration: brndnmtthws/conky#112
Since the update to 1.10.0, the exec command and friends don't run on the very first iteration for me.
For example, with the following config file
I get the output
etc.
The text was updated successfully, but these errors were encountered: