Sample Header Ad - 728x90

Conky: attempt to compare number with nil

1 vote
0 answers
165 views
I'm trying to make my own conky script, and I'm having some trouble with a script I'm using. The script is this one. This is the problematic part: { name="diskio_read", arg="/dev/nvme0n1", max=100, width=85, height=110, y=505, x=25, nb_values=100, bg_colour={{0,0x000000,0}}, fg_bd_colour = { {0,0x49a835,1}, }, foreground=false, fg_bd_size=0.7, bg_bd_size=0.5, }, The error it generates: conky: llua_do_call: function conky_main execution failed: attempt to compare number with nil The thing is that I have enabled format_human_readable = true, thus causing diskio_read to return a value with unit. Now, I have enabled format_human_readable because in I use ${mem} and ${memmax}. My question is if there is any way to convert any number or variable (for example, ${mem}) from a raw number to a human readable number. That way, I can keep format_human_readable = false and avoid having troubles with the lua scripts. The other way around would be to convert from a human readable number to a raw number, and instead leave format_human_readable = true and modify the value that I give to the scripts. Here are the scripts and configs: **conky.conf** **loadAll.lua** **bar.lua** **graph.lua** this is how the script looks as is: enter image description here
Asked by fpp (111 rep)
Mar 3, 2023, 07:40 PM