Convert to new 1.10 syntax

lasers edited this page Sep 15, 2018 · 10 revisions

This page is very minimal and incomplete, if you feel like expanding this page please do!

Convert to the new 1.10 syntax

Some things have changed since the release of 1.10, there is a new way of writing the settings and variables and some settings/variables are removed. The good news is the Lua API hasn't been changed so all your Lua scripts still work!

The easiest way to convert an existing config is to use the convert.lua script. To use it simply type ./convert.lua your_config in your terminal, be careful the config will be overwritten so take a backup first!

Unfortunately the convert script is not flawless, you might still need to tweak it somewhat but it should take care of the more annoying and tedious work (syntax change).


  • The most noticeable changes are the settings section, all the settings are now place in conky.config = { settings here }; and the text is place in conky.text = [[ text section ]];.

  • The values in the config section are separated by a ,

  • Comments start with -- this is a comment. You can have multiline comments by using:

--[[
your
text
]]

This is the Lua syntax of writing comments.

In the conky.text = [[text section]]; section, comments are still written using a #.

  • Some variables have had subtle changes, for example the rss variable updates now in seconds instead of minutes. If you experience any weird behavior with your new config, I advise you to check out the manual for a possible change in variable syntax. Some variables are also not available anymore in conky 1.10 eg. ${pre_exec ...}. When you still can not find the correct solution you might want to try the -D or -DD flag when you start conky in your terminal eg. conky -DD -c /PATH/TO/CONFIG . This will run conky in debug mode giving you an insight into what conky is doing at the moment.

  • Colors do not use the # any more, so #DCDCDC becomes DCDCDC. eg. ${color DCDCDC} or color0 = 'DCDCDC'


Also take a look here: Settings and Variables. If you want an example of a new syntax config, take a look at the default conky config.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.