brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.17k stars 615 forks source link

Syntax error: attempt to load lua script instead of config #884

Closed Alex-Programs closed 5 years ago

Alex-Programs commented 5 years ago

Issue

I am trying to install this and having added package.preload['cairo'] I have an error I can't find anything about-

[redacted]@[redacted]-ubuntu-Lenovo110s:~/.conky$ conky -c conky-mcrn.lua
conky: Syntax error (conky-mcrn.lua:2: '=' expected near 'package') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: [string "..."]:139: attempt to index local 'settings' (a nil value)

Information

Ubuntu budgie, conky -v returns:


 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * eve-online
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
  * PulseAudio

 Lua bindings:
  * Cairo
  * Imlib2
  * RSVG
 X11:
  * Xdamage extension
  * Xinerama extension (virtual display)
  * Xshape extension (click through)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * Audacious
  * MPD
  * MOC
  * XMMS2

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256

Does anyone have any idea how to fix this?

lasers commented 5 years ago

You want to use -c to load conkyrc, not lua script(s).

Inside your conkyrc, you can load lua script(s) using various lua_* configuration settings.

In that case, use https://github.com/carriejv/dotfiles/blob/master/mcrn/.conkyrc and fix the path.

Alex-Programs commented 5 years ago

Thanks for the help! I now have another problem, when trying to load the script I get

conky: window type - override
conky: drawing to created window (0x4400002)
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  1 (X_CreateWindow)
  Serial number of failed request:  101
  Current serial number in output stream:  105
lasers commented 5 years ago

Try commenting out own_window* settings. If that doesn't work, I don't have anything else in mind.

lasers commented 5 years ago

1) First problem has been solved. Conky ran okay. 2) Second problem (i.e. X Error) is out of my scope.

No response for two weeks. I'm closing this. Thanks. :+1: