I've got this "value is nil" errors to but it didn't make me any trouble thought. It was always once durring start for legitimate value of "conky_window.width" and it popped up in terminal so I've ruled it out by this code.
So I've had solution at hands.
Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | My Conky Pitstop corner | One4All project
Just upgraded to Karmic, and I'm getting this error.....
.....sometimes
i've posted on the bug websiteCode:Conky: X Error: type 0 Display 8dcb7e0 XID 23076034 serial 103 error_code 3 request_code 20 minor_code 0 other Display: 8dcb7e0
any ideas?
I'll never drink water again....Fish poo in it!
XP for iTunes Only : Ubuntu10.04 : Crunchbang : DSL
I'm Pushing Narcoleptic Numbat for ubuntu11.04
Proper Funny Stuff
are you having troubles with the nil value still?
if so see post 31 in this thread.
Last edited by 5BallJuggler; October 13th, 2009 at 12:15 AM.
nope no nil value errors anymore
Hello searchOne,
i'm interesting with conky design that you post in here
i'ts using londonali1010 ring script.
i'm total newbie about conky script so i try configure that script to fit in my 1024x768 screen.
but i can't find the part of cpu 2 ring, that ican't move with the other
and the calendar day colom not in line with the date (as attached)
here the script :
rings.luaCode:background no use_xft yes xftfont terminus:size=8 xftalpha 0.2 update_interval 1 total_run_times 0 own_window yes own_window_type normal own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager own_window_class conky double_buffer yes no_buffers yes cpu_avg_samples 2 net_avg_samples 2 use_spacer none draw_shades no draw_outline no draw_borders no draw_graph_borders no default_color white alignment tl uppercase no text_buffer_size 2048 imlib_cache_size 0 minimum_size 1000 290 gap_y 10 # — Lua Load — # lua_load ~/scripts/rings.lua lua_draw_hook_pre ring_stats TEXT ${voffset 30}${goto 300}${diskiograph 80,300 FFFF00 FF0000 -t}${voffset -110} ${voffset 98}${goto 151}${color 1E90FF}${cpubar cpu5 2,727}${color} ${voffset -30}${goto 190}${font Zekton:size=12}CrunchBang \#! 9.04.01${font Zekton:size=8}${voffset 2} ${voffset 10}${goto 190}Conky ${conky_version} ${goto 350}Kernel: ${kernel} ${goto 190}${exec whoami} @ $nodename $machine ${goto 350}Uptime: ${uptime} ${goto 190}Desktop: ${desktop_number} - ${desktop}${goto 350}CPU Temp: ${acpitemp}${offset -2} °C ${goto 190}HDD Temp: ${hddtemp /dev/sda}${offset -2} °C ${goto 350}Grafik Temp: ${nvidia temp}${offset -2} °C${if_existing /proc/net/route wlan0}${goto 450}WLAN: ${addrs wlan0}${endif}${if_existing /proc/net/route eth0}${goto 450}LAN: ${addrs eth0}${endif} ${goto 190}${font Zekton:Bold:size=10}Name top${goto 280}time${goto 330}cpu${goto 370}mem${goto 430}${font Zekton:Bold:size=10}Name top-io${goto 530}time${goto 580}mem${font Zekton:size=8} ${color red}${goto 190}${top name 1} ${goto 280}${top time 1}${goto 330}${top cpu 1}${goto 370}${top mem 1} ${goto 430}${top_io 1}${top_io name 1}${goto 530}${top_io time 1}${goto 580}${top_io mem 1} ${color}${goto 690}${execi 99999 cat /proc/cpuinfo | grep "model name" -m1 | cut -d":" -f2 | cut -d" " -f2-} ${goto 190}${top name 2} ${goto 280}${top time 2}${goto 330}${top cpu 2}${goto 370}${top mem 2}${color} ${top_io 2} ${goto 430}${top_io name 2}${goto 530}${top_io time 2}${goto 580}${top_io mem 2} ${goto 600}${execpi 3600 /home/search/conkynv.sh} ${goto 190}${top name 3} ${goto 280}${top time 3}${goto 330}${top cpu 3}${goto 370}${top mem 3}${color} ${top_io 3} ${goto 430}${top_io name 3}${goto 530}${top_io time 3}${goto 580}${top_io mem 3} ${if_existing /proc/net/route wlan0}${voffset -210}${goto 600}${font DTPDingbats:size=18}${color green}C${font Zekton:size=12}${downspeed wlan0}${color} ${voffset -15}${goto 810}${font DTPDingbats:size=18}${color red}D${font Zekton:size=12}${upspeed wlan0}${color}${endif} ${if_existing /proc/net/route eth0}${voffset -210}${goto 810}${font DTPDingbats:size=18}${color green}C${font Zekton:size=12}${downspeed wlan0}${color} ${voffset -15}${goto 810}${font DTPDingbats:size=18}${color red}D${font Zekton:size=12}${upspeed wlan0}${color}${endif} ${font} ${voffset -215} ${goto 71}${color 1E90FF}RAM: ${memperc}% ${goto 71}${color FF0000}CPU-1: ${cpu cpu0}% ${goto 71}${color FF0000}CPU-2: ${cpu cpu1}% ${goto 71}${color FFFF00}BAT: ${battery_percent BAT0}% ${goto 71}${color 00FF00}Disk: ${fs_used_perc /}%${color} ${voffset -45}${goto 894}${font Zekton:size=10}${time %H:%M:%S} ${voffset -72}${color CDCD00}${goto 690}${font Zekton:Bold:size=8}${time %A} ${goto 690}${font Zekton:size=10}${time %_d %B %Y}${color} ${font LiberationMono:Bold:size=9} ${voffset -10}${execpi 60 DJS=`date +%_d`; cal -m | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${goto 690} /' | sed /" $DJS "/s/" $DJS "/" "'${color orange}'"$DJS"'${color}'" "/} ${voffset -400}
capture my desktop :Code:--[[ Ring Meters by londonali1010 (2009) This script draws percentage meters as rings. It is fully customisable; all options are described in the script. IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num>5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num>3; conversely if you update Conky every 0.5s, you should use update_num>10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error. To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua): lua_load ~/scripts/rings.lua lua_draw_hook_pre ring_stats Changelog: + v1.1 -- Added options for the starting angle of the rings, and added the "max" variable, to allow for variables that output a numerical value rather than a percentage (29.09.2009) + v1.0 -- Original release (28.09.2009) ]] settings_table = { { -- Edit this table to customise your rings. -- You can create more rings simply by adding more elements to settings_table. -- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'. name='cpu', -- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''. arg='cpu0', -- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100. max=100, -- "bg_colour" is the colour of the base ring. bg_colour=0xCDCDC1, -- "bg_alpha" is the alpha value of the base ring. bg_alpha=0.5, -- "fg_colour" is the colour of the indicator part of the ring. fg_colour=0xFF0000, -- "fg_alpha" is the alpha value of the indicator part of the ring. fg_alpha=0.8, -- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window. x=120, y=120, -- "radius" is the radius of the ring. radius=81, -- "thickness" is the thickness of the ring, centred around the radius. thickness=10, -- "angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative. angle=90 }, { name='cpu', arg='cpu1', max=100, bg_colour=0xCDCDC1, bg_alpha=0.5, fg_colour=0xFF0000, fg_alpha=0.5, x=100, y=120, radius=75, thickness=8, angle=90 }, { name='memperc', arg='', max=100, bg_colour=0xffffff, bg_alpha=0.2, fg_colour=0x1E90FF, fg_alpha=0.5, x=100, y=120, radius=82, thickness=5, angle=90 }, { name='fs_used_perc', arg='/', max=100, bg_colour=0xffffff, bg_alpha=0.1, fg_colour=0x00FF00, fg_alpha=0.5, x=100, y=120, radius=55, thickness=8, angle=90 }, { name='battery_percent', arg='BAT0', max=100, bg_colour=0xffffff, bg_alpha=0.2, fg_colour=0xFFFF00, fg_alpha=1, x=100, y=120, radius=65, thickness=8, angle=90 }, { name='time', arg='+%S', max=60, bg_colour=0xE3E3E3, bg_alpha=0.1, fg_colour=0xFFFF00, fg_alpha=0.7, x=924, y=120, radius=70, thickness=4, angle=0 }, { name='time', arg='+%M', max=60, bg_colour=0xE3E3E3, bg_alpha=0.1, fg_colour=0x00CD00, fg_alpha=0.7, x=924, y=120, radius=64, thickness=7, angle=0 }, { name='time', arg='+%H', max=24, bg_colour=0xE3E3E3, bg_alpha=0.1, fg_colour=0xffffff, fg_alpha=0.7, x=924, y=120, radius=52, thickness=14, angle=0 }, } require 'cairo' function rgb_to_r_g_b(colour,alpha) return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha end function draw_ring(t, pt) if conky_window==nil then return end local w,h=conky_window.width,conky_window.height local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual,w,h) cr=cairo_create(cs) local xc,yc,ring_r,ring_w,angle=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['angle'] local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha'] local angle_0=angle*(2*math.pi/360)-math.pi/2 local t_arc=t*2*math.pi -- Draw background ring cairo_arc(cr,xc,yc,ring_r,0,2*math.pi) cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga)) cairo_set_line_width(cr,ring_w) cairo_stroke(cr) -- Draw indicator ring cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc) cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga)) cairo_stroke(cr) cairo_destroy(cr) cr = nil end function conky_cairo_cleanup() cairo_surface_destroy(cs) cs = nil end function conky_ring_stats() local function setup_rings(pt) local str='' local value=0 str=string.format('${%s %s}',pt['name'],pt['arg']) str=conky_parse(str) value=tonumber(str) pct=value/pt['max'] draw_ring(pct,pt) end -- Check that Conky has been running for at least 5s local updates=conky_parse('${updates}') update_num=tonumber(updates) if update_num>5 then for i in pairs(settings_table) do setup_rings(settings_table[i]) end end end
please help and thanks for support.
regards,
Maulbox
Last edited by maulbox; October 16th, 2009 at 04:42 AM. Reason: attached capture
Hi Maulbox...
In your rings.lua, the first ring (with all the comments in the settings_table) has a centre of x=120, y=100. All the others have x=100, y=100. Looks like you just missed that one!
- Samsung R519 Silver - Dual-Boot Windows 7/Ubuntu 9.10 -
- The Official Conky Blog - Follow conkynews on Twitter -
- My Launchpad PPA -
- My blog: My Little Desktop -
found it, i thoug below its not part of the script
Code:settings_table = { { -- Edit this table to customise your rings. -- You can create more rings simply by adding more elements to settings_table. -- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'. name='cpu', -- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''. arg='cpu0', -- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100. max=100, -- "bg_colour" is the colour of the base ring. bg_colour=0xCDCDC1, -- "bg_alpha" is the alpha value of the base ring. bg_alpha=0.5, -- "fg_colour" is the colour of the indicator part of the ring. fg_colour=0xFF0000, -- "fg_alpha" is the alpha value of the indicator part of the ring. fg_alpha=0.8, -- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window. x=100, y=120, -- "radius" is the radius of the ring. radius=91, -- "thickness" is the thickness of the ring, centred around the radius. thickness=10, -- "angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative. angle=90
Last edited by maulbox; October 16th, 2009 at 02:51 PM. Reason: solve thanks
Hi maulbox,
are the Fonts which are used in my Conky script also installed with you?
Font >LiberationMono, >DTPDingbats or >Zekton?
If not, please Installing only the missing Fonts and tries it once more!
64Bit - HP Compaq Presario CQ60-105EG, 4GB RAM, 160GB, NVIDIA GeForce 8200M, AMD Athlon X2 Dual-Core / Mandriva 2009.1, Mandriva 2010, #! Crunchbang 9.04.01 Conky-Hardcore - searchOne
Bookmarks