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

Bare Bones example doesn't work? #917

Closed four43 closed 1 year ago

four43 commented 4 years ago

Issue

After basically copy/pasting the example config from here: https://github.com/brndnmtthws/conky/wiki/Using-Lua-scripts-(Part-01)%3A-How-does-a-lua-script-work

Conky does't start, requiring a text section. There doesn't seem to be any mention of a text section when drawing with Lua? This is all very confusing. These docs are sparse at best, and I'd like to help.

Information

Conky Version Info

``` $ conky --version conky 1.11.5_pre compiled Tue 17 Dec 2019 09:57:09 PM CST for Linux 5.3.0-24-generic x86_64 Compiled in features: System config file: /etc/conky/conky.conf Package library path: /usr/local/lib/conky General: * math * hddtemp * portmon * IPv6 * Curl * ICal * Weather (METAR) * support for IBM/Lenovo notebooks * builtin default configuration * old configuration syntax * Imlib2 * OSS mixer support * apcupsd * iostats * ncurses * Internationalization support X11: * Xdamage extension * Xinerama extension (virtual display) * Xshape extension (click through) * XDBE (double buffer extension) * Xft * ARGB visual * Own window Music detection: * CMUS * MPD * MOC Default values: * Netdevice: eno1 * Local configfile: $HOME/.conkyrc * Localedir: /usr/local/share/locale * Maximum netdevices: 256 * Maximum text size: 16384 * Size text buffer: 256 ``` Config: ```lua conky.config = { lua_load = "./wiki-demo.lua", lua_draw_hook_post = "main" }; ```

This could just be me playing devils advocate, but I'm having a really hard time getting started with conky. Most of the online examples are for the old version, and the docs in the wiki seem incredibly sparse and don't really give you a firm starting point. Can we expand that first section into a working example?

Thanks for your help.

lasers commented 4 years ago

the docs in the wiki seem incredibly sparse and don't really give you a firm starting point. Can we expand that first section into a working example?

Conky does't start, requiring a text section. There doesn't seem to be any mention of a text section when drawing with Lua? This is all very confusing. These docs are sparse at best, and I'd like to help.

Anybody can edit the docs. Feel free to contribute more working tidbits. :-)

There doesn't seem to be any mention of a text section when drawing with Lua?

I'm not sure about this, but users familiar with conky know that there should always be at least a config section and a text section in the config.

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

Most of the online examples are for the old version.

I agree. If you search lua here (in issues or on Internet), you can find some decent configs to start working off on. Maybe #656.

Also... If I remember this correctly, the config itself is a lua config too. I don't really know anything about this. Sorry I can't be more helpful.

four43 commented 4 years ago

Awesome good starting points. I'm gonna try and hack through some more and hopefully get a newb's perspective on this (I'm new to Lua too) and post it back here/docs. Thanks for the starting points too. I'll try and incorporate those in.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days.