perhaps in the future any further
"vinDSL conky doesnt work for meeee!!!"
posts should be directed to PM vinDSL?
anyway heres a little something
conky screen saver
the script draws a circle, radius equal to current cpu usage, then moves randomly (distance based on cpu usage too) and draws a new circle. Ive set its enclosure to my whole screen so it should just roam around and look pretty
this is it with conky running 2 updates per second
this is 1 update per second
script for ring
heres another tweak... the effects of watching youtubeCode:require 'cairo' function conky_draw_fig() if conky_window == nil then return end local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height) cr = cairo_create(cs) local updates=tonumber(conky_parse('${updates}')) --######################################################################################################### --initialize tables if updates==2 then cputab={} cputlen=60 cpux={} cpuy={} for i=1,60 do cpux[i]=200.5 cpuy[i]=200.5 end memtab={} memtlen=60 memx={} memy={} for i=1,60 do memx[i]=200.5 memy[i]=400.5 end cpur={} cpug={} cpub={} cpua={} end --######################################################################################################### if updates>5 then --######################################################################################################### --######################################################################################################### cpu=conky_parse("${cpu}") for i=1,tonumber(cputlen) do if cputab[i+1]==nil then cputab[i+1]=0 end cputab[i]=cputab[i+1] if i==cputlen then cputab[cputlen]=cpu end end --box bx=0 by=0 bw=1440 bh=900 cairo_set_source_rgba (cr,0,0,0,1) cairo_set_line_width (cr,1) cairo_rectangle (cr,bx,by,bw,bh) cairo_fill (cr) --cairo_set_source_rgba (cr,1,1,1,1) --cairo_rectangle (cr,bx,by,bw,bh) --cairo_stroke (cr) for i=1,60 do if cpux[i-1]==nil then cpux[i-1]=0 end if cpuy[i-1]==nil then cpuy[i-1]=0 end cpux[i-1]=cpux[i] cpuy[i-1]=cpuy[i] x=cpux[i-1] y=cpuy[i-1] if x==nil then x=300 end if y==nil then y=300 end if i==60 then rad=cputab[60] arc=((2*math.pi)/360)*(math.random(1,360)) lx=0+rad*(math.sin(arc)) ly=0-rad*(math.cos(arc)) if x+lx<bx or x+lx>bx+bw then cpux[60]=x-lx else cpux[60]=x+lx end if y+ly<by or y+ly>by+bh then cpuy[60]=y-ly else cpuy[60]=y+ly end end end mir,mig,mib,mia=0,1,0,1 -- start color sir,sig,sib,sia=0,0,0,1 -- end color --cpu color for i=1,60 do cpur[i]=((mir-sir)*(i/60))+sir cpug[i]=((mig-sig)*(i/60))+sig cpub[i]=((mib-sib)*(i/60))+sib cpua[i]=((mia-sia)*(i/60))+sia end cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); for i=1,60 do if cpux[i-1]==nil then cpux[i-1]=0 end if cpuy[i-1]==nil then cpuy[i-1]=0 end cairo_set_source_rgba (cr,0,0,0,1) cairo_set_line_width (cr,1+((8/60)*i)) cairo_arc (cr,cpux[i],cpuy[i],cputab[i],0,2*math.pi) cairo_stroke (cr) cairo_set_source_rgba (cr,cpur[i],cpug[i],cpub[i],cpua[i]) cairo_set_line_width (cr,1+((4/60)*i)) --cairo_move_to (cr,cpux[i-1],cpuy[i-1]) --cairo_line_to (cr,cpux[i],cpuy[i]) cairo_arc (cr,cpux[i],cpuy[i],cputab[i],0,2*math.pi) cairo_stroke (cr) --cairo_set_source_rgba (cr,0,0,0,1) --cairo_set_line_width (cr,1+((2/60)*i)) --cairo_arc (cr,cpux[i],cpuy[i],cputab[i],0,2*math.pi) --cairo_stroke (cr) --cairo_set_source_rgba (cr,0,0,0,(i/60)*1) --cairo_set_line_width (cr,(1/60)*i) --cairo_move_to (cr,cpux[i-1],cpuy[i-1]) --cairo_line_to (cr,cpux[i],cpuy[i]) --cairo_stroke (cr) end mem=conky_parse("${memperc}") for i=1,tonumber(memtlen) do if memtab[i+1]==nil then memtab[i+1]=0 end memtab[i]=memtab[i+1] if i==memtlen then memtab[memtlen]=mem end end --box bx=100.5 by=300.5 bw=200 bh=200 cairo_set_source_rgba (cr,0,0,0,1) cairo_set_line_width (cr,1) cairo_rectangle (cr,bx,by,bw,bh) --cairo_fill (cr) cairo_set_source_rgba (cr,1,1,1,1) cairo_rectangle (cr,bx,by,bw,bh) --cairo_stroke (cr) for i=1,60 do if memx[i-1]==nil then memx[i-1]=0 end if memy[i-1]==nil then memy[i-1]=0 end memx[i-1]=memx[i] memy[i-1]=memy[i] x=memx[i-1] y=memy[i-1] if x==nil then x=300 end if y==nil then y=300 end if i==60 then rad=memtab[60] arc=((2*math.pi)/360)*(math.random(1,360)) lx=0+rad*(math.sin(arc)) ly=0-rad*(math.cos(arc)) if x+lx<bx or x+lx>bx+bw then memx[60]=x-lx else memx[60]=x+lx end if y+ly<by or y+ly>by+bh then memy[60]=y-ly else memy[60]=y+ly end end end cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); for i=1,60 do if memx[i-1]==nil then memx[i-1]=0 end if memy[i-1]==nil then memy[i-1]=0 end cairo_set_source_rgba (cr,0,(i/60)*1,(i/60)*1,(i/60)*1) cairo_set_line_width (cr,1+((3/60)*i)) cairo_move_to (cr,memx[i-1],memy[i-1]) cairo_line_to (cr,memx[i],memy[i]) --cairo_stroke (cr) cairo_set_source_rgba (cr,0,0,0,(i/60)*1) cairo_set_line_width (cr,(1/60)*i) cairo_move_to (cr,memx[i-1],memy[i-1]) cairo_line_to (cr,memx[i],memy[i]) --cairo_stroke (cr) end --######################################################################################################### --######################################################################################################### end-- if updates>5 end-- end main function
random colors
this one does the color circles
maybe i need to put some nice radial shading on those circles to make them stand out against each other moreCode:require 'cairo' function conky_draw_fig() if conky_window == nil then return end local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height) cr = cairo_create(cs) local updates=tonumber(conky_parse('${updates}')) --######################################################################################################### --initialize tables if updates==2 then cputab={} cputlen=60 cpux={} cpuy={} --edit below to give start coordinates cpux and cpuy before starting script for i=1,60 do cpux[i]=200.5 cpuy[i]=200.5 end cpur={} cpug={} cpub={} cpua={} end --######################################################################################################### if updates>5 then --######################################################################################################### --######################################################################################################### cpu=conky_parse("${cpu}") for i=1,tonumber(cputlen) do if cputab[i+1]==nil then cputab[i+1]=0 end cputab[i]=cputab[i+1] if i==cputlen then cputab[cputlen]=cpu end end colr=math.random(0,1) for i=1,tonumber(cputlen) do if cpur[i+1]==nil then cpur[i+1]=0 end cpur[i]=cpur[i+1] if i==cputlen then cpur[cputlen]=colr end end colg=math.random(0,1) for i=1,tonumber(cputlen) do if cpug[i+1]==nil then cpug[i+1]=0 end cpug[i]=cpug[i+1] if i==cputlen then cpug[cputlen]=colg end end colb=math.random(0,1) for i=1,tonumber(cputlen) do if cpub[i+1]==nil then cpub[i+1]=0 end cpub[i]=cpub[i+1] if i==cputlen then cpub[cputlen]=colb end end --background box and movement limits bx=0 by=0 bw=1440 bh=900 cairo_set_source_rgba (cr,0,0,0,1) cairo_set_line_width (cr,1) cairo_rectangle (cr,bx,by,bw,bh) cairo_fill (cr) for i=1,60 do if cpux[i-1]==nil then cpux[i-1]=0 end if cpuy[i-1]==nil then cpuy[i-1]=0 end cpux[i-1]=cpux[i] cpuy[i-1]=cpuy[i] x=cpux[i-1] y=cpuy[i-1] if x==nil then x=300 end if y==nil then y=300 end if i==60 then rad=cputab[60] arc=((2*math.pi)/360)*(math.random(1,360)) lx=0+rad*(math.sin(arc)) ly=0-rad*(math.cos(arc)) if x+lx<bx or x+lx>bx+bw then cpux[60]=x-lx else cpux[60]=x+lx end if y+ly<by or y+ly>by+bh then cpuy[60]=y-ly else cpuy[60]=y+ly end end end --set alpha gradient sa=1 ea=0 --cpu color for i=1,60 do cpua[i]=((sa-ea)*(i/60))+ea end cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); for i=1,60 do if cpux[i-1]==nil then cpux[i-1]=0 end if cpuy[i-1]==nil then cpuy[i-1]=0 end cairo_set_source_rgba (cr,cpur[i],cpug[i],cpub[i],cpua[i]) cairo_set_line_width (cr,1+((4/60)*i)) cairo_arc (cr,cpux[i],cpuy[i],cputab[i],0,2*math.pi) cairo_fill (cr) end --######################################################################################################### --######################################################################################################### end-- if updates>5 end-- end main function
here is mine.... if it can help. i usually download the scripts and try to tweak to my taste. one of the scripts is what you need, may be this will help ?
Code:################################ # # # Conky Script # # Made by Martin Rotter # # skunkic@seznam.cz # # Version 0.1 # # Uses GNU GPLv3 License # # # ################################ # Create own window instead of using desktop own_window no own_window_hints undecorated,below,skip_taskbar background yes # Use double buffering double_buffer yes # Fiddle with window use_spacer yes use_xft yes # Update interval in seconds update_interval 1.0 # this is used if system is not running on battery battery update_interval_on_battery 30.0 # this is used if system is running on battery battery, higher value ensures that conky save battery power # Minimum size of text area minimum_size 400 5 # Draw shades? draw_shades no # Text stuff draw_outline no draw_borders no uppercase no # Stippled borders? stippled_borders 8 # Border margins border_margin 4 # Border width border_width 1 # Default colors and also border colors default_color grey default_shade_color blur default_outline_color grey own_window_colour black own_window_transparent yes # Text alignment alignment top_right # Gap between borders of screen and text gap_x 35 gap_y 52 # Font settings override_utf8_locale yes xftfont Terminus:size=9 xftalpha 0.8 # Front-End TEXT # TIME & OS INFORMATION ${alignc -105}Time & OS Information ${offset 210}${color grey}${hr 1} ${offset 210}${color cyan}Date: ${color }${alignr 9}${time %a,%e %b %G} ${offset 210}${color cyan}Time: ${color }${alignr 9}${time %H:%M (%Z)} ${offset 210}${color cyan}Uptime: ${color }${alignr 9}$uptime_short ${offset 210}${color cyan}OS: ${color }${alignr 9}$sysname ($machine) ${offset 210}${color cyan}Kernel: ${color }${alignr 9}$kernel # Wi-Fi CONNECTION ${if_up wlan0} ${alignc -105}Wi-Fi Connection ${offset 210}${color grey}${hr 1} ${offset 210}${color green}AP's eSSID: ${color }${alignr 9}${wireless_essid wlan0} ${offset 210}${color green}AP's IP: ${color }${alignr 9}$gw_ip ${offset 210}${color green}My IP: ${color }${alignr 9}${addr wlan0} ${offset 210}${color green}Signal Strength: ${color }${alignr 9}${wireless_link_qual wlan0}% ${offset 210}${color green}Downloaded: ${color }${alignr 9}${totaldown wlan0} ${offset 210}${color green}Uploaded: ${color }${alignr 9}${totalup wlan0} $endif # SYSTEM LOAD ${alignc -105}System Load ${offset 210}${color grey}${hr 1} ${offset 210}${color orange}CPU Load: ${color }${alignr 9}${cpu 0} % ${offset 210}${color orange}CPU Temperature: ${color }${alignr 9}${acpitemp}°C ${offset 210}${color orange}Average Load: ${color }${alignr 9}$loadavg ${offset 210}${color orange}Total Running Processes: ${color }${alignr 9}${alignr -2}$processes ${offset 210}${color cyan}Top 3 Running Processes: ${offset 210}${color }${top name 1}${alignr 9}${top pid 1} ${offset 210}${color }${top name 2}${alignr 9}${top pid 2} ${offset 210}${color }${top name 3}${alignr 9}${top pid 3} # BATTERY ${alignc -105}Battery ${offset 210}${color grey}${hr 1} ${offset 210}${color green}Battery Status: ${color }${alignr 9}${battery BAT0} ${offset 210}${color green}Battery Health: ${color }${alignr 9}${battery_percent BAT0} % ${offset 210}${color green}Battery Time: ${color }${alignr 9}${battery_time BAT0} # FILESYSTEM ${alignc -105}info-SYS ${offset 210}${color grey}${hr 1} ${offset 210}${color cyan}RAM: ${color }${alignr 9}$memmax ($memperc% Used) ${offset 210}${membar 3,100} ${offset 210}${color cyan}UBUNTU: ${color }${alignr 9}${fs_free /}/${fs_size /} ${offset 210}${fs_bar 3,100 /} ${offset 210}${color cyan}HOME: ${color }${alignr 9}${fs_free /home}/${fs_size /home} ${offset 210}${fs_bar 3,100 /home} ${offset 210}${color cyan}Linux: ${color }${alignr 9}${fs_free /media/linux}/${fs_size /media/linux} ${offset 210}${fs_bar 3,100 /media/linux} ${offset 210}${color cyan}LinuxBackup: ${color }${alignr 9}${fs_free /media/LinuxBackup}/${fs_size /media/LinuxBackup} ${offset 210}${fs_bar 3,100 /media/LinuxBackup} ${offset 210}${color cyan}WIN7 C: ${color }${alignr 9}${fs_free /media/38981A009819BCF6}/${fs_size /media/38981A009819BCF6} ${offset 210}${fs_bar 3,100 /media/38981A009819BCF6} ${offset 210}${color cyan}Windows: ${color }${alignr 9}${fs_free /media/windows}/${fs_size /media/windows} ${offset 210}${fs_bar 3,100 /media/windows}
conky script-2
Code:# Elegant Conky settings # background no update_interval 1 cpu_avg_samples 2 net_avg_samples 2 override_utf8_locale yes double_buffer yes no_buffers yes text_buffer_size 2048 #imlib_cache_size 0 temperature_unit fahrenheit # Window specifications # own_window no own_window_type override own_window_transparent no own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below border_inner_margin 0 border_outer_margin 0 minimum_size 200 250 maximum_width 200 alignment tr gap_x 40 #align right #gap_x 1050 #align left gap_y 45 # Graphics settings # draw_shades no draw_outline no draw_borders no draw_graph_borders no # Text settings # use_xft yes xftfont Verbocentric:size=9 #Sans Serif:size=9 xftalpha 0.8 text_buffer_size 2048 uppercase no temperature_unit celsius #default_color brown #default_color 1c1c1c default_color 939393 #default_color 000000 # Lua Load # lua_load ~/.conky/clock_rings.lua lua_draw_hook_pre clock_rings TEXT ${voffset 8}${color FF6600}${font Sans Serif:size=16}${time %A}${font}${voffset -8}${alignr 50}${color FFFFFF}${font Sans Serif:size=38}${time %e}${font} ${color FFFFFF}${voffset -30}${color FFFFFF}${font Sans Serif:size=18}${time %b}${font}${voffset -3} ${color FFFFFF}${font Sans Serif:size=20}${time %Y}${font}${color FF6600}${hr} ${voffset 140}${font Sans Serif:size=10}${alignr}${time %H:%M}${font}${color} ${pre_exec lsb_release -ircs} ${color FF6600}${hr}${color} Kernel: ${alignr}${kernel} Uptime: ${alignr}${uptime} Temperature: ${alignr}${acpitemp}°C CPU1: ${cpu cpu1}% ${alignr}${color FF6600}${cpugraph cpu1 8,60 FF6600 FFFFFF}${color} CPU2: ${cpu cpu2}% ${alignr}${color FF6600}${cpugraph cpu2 8,60 FF6600 FFFFFF}${color} RAM: $memperc% ${alignr}${color FF6600}${memgraph 8,60 FF6600 FFFFFF}${color} Top Processes ${color FF6600}${hr}${color} ${top name 1}$alignr${color FF6600}${top cpu 1}${color}${top pid 1} ${top name 2}$alignr${color FF6600}${top cpu 2}${color}${top pid 2} ${top name 3}$alignr${color FF6600}${top cpu 3}${color}${top pid 3} Now Playing ${color FF6600}${hr}${color} ${if_running banshee-1} Title: ${exec banshee-1 --query-title | cut -f2- -d" "} Artist: ${exec banshee-1 --query-artist | cut -f2- -d" "} Album: ${exec banshee-1 --query-album | cut -f2- -d" "}${else}${if_running rhythmbox} Title: ${exec rhythmbox-client --no-start --print-playing-format %tt} Artist: ${exec rhythmbox-client --no-start --print-playing-format %aa} Album: ${exec rhythmbox-client --no-start --print-playing-format %at}${else}${if_running exaile} Title: ${execi 10 exaile --get-title} Artist: ${execi 10 exaile --get-artist} Album: ${execi 10 exaile --get-album} }${else}${if_running amarok} Title: ${exec dcop amarok player title} Artist: ${exec dcop amarok player artist} Album: ${exec dcop amarok player album}${else} Player Status Unavailable${endif}${endif}${endif}${endif} Network Statistics ${color FF6600}${hr}${color} ${if_existing /proc/net/route wlan0} Up: ${upspeed wlan0} kb/s ${alignr}${upspeedgraph wlan0 8,60 FF6600 FFFFFF} Down: ${downspeed wlan0} kb/s ${alignr}${downspeedgraph wlan0 8,60 FF6600 FFFFFF} Upload: ${alignr}${totalup wlan0} Download: ${alignr}${totaldown wlan0} Signal: ${wireless_link_qual wlan0}% ${alignr}${wireless_link_bar 8,60 wlan0} IP Address: ${alignr}${addr wlan0} ${else}${if_existing /proc/net/route eth0} Up: ${upspeed eth0} kb/s ${alignr}${upspeedgraph eth0 8,60 FF6600 FFFFFF} Down: ${downspeed eth0} kb/s ${alignr}${downspeedgraph eth0 8,60 FF6600 FFFFFF} Upload: ${alignr}${totalup eth0} Download: ${alignr}${totaldown eth0} IP Address: ${alignr}${addr eth0} ${else}${if_existing /proc/net/route eth1} Up: ${upspeed eth1} kb/s ${alignr}${upspeedgraph eth1 8,60 FF6600 FFFFFF} Down: ${downspeed eth1} kb/s ${alignr}${downspeedgraph eth1 8,60 FF6600 FFFFFF} Upload: ${alignr}${totalup eth1} Download: ${alignr}${totaldown eth1} IP Address: ${alignr}${addr eth1} ${else} Network Unavailable${endif}${endif}${endif}
the 2nd scrip is shown as per 2nd pic. i ll also give the lua script for the clok to load
i am using the 2nd one as the looks are more eye-candy....Code:--[[ This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua 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/clock_rings.lua lua_draw_hook_pre clock_rings ]] 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='time', -- "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='%I.%M', -- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100. max=12, -- "bg_colour" is the colour of the base ring. bg_colour=0xffffff, -- "bg_alpha" is the alpha value of the base ring. bg_alpha=0.1, -- "fg_colour" is the colour of the indicator part of the ring. fg_colour=0xFF6600, -- "fg_alpha" is the alpha value of the indicator part of the ring. fg_alpha=0.2, -- "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=1145, y=200, -- "radius" is the radius of the ring. radius=50, -- "thickness" is the thickness of the ring, centred around the radius. thickness=5, -- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative. start_angle=0, -- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger than start_angle. end_angle=360 }, { name='time', arg='%M.%S', max=60, bg_colour=0xffffff, bg_alpha=0.1, fg_colour=0xFF6600, fg_alpha=0.4, x=1145, y=200, radius=56, thickness=5, start_angle=0, end_angle=360 }, { name='time', arg='%S', max=60, bg_colour=0xffffff, bg_alpha=0.1, fg_colour=0xFF6600, fg_alpha=0.6, x=1145, y=200, radius=62, thickness=5, start_angle=0, end_angle=360 }, { name='time', arg='%d', max=31, bg_colour=0xffffff, bg_alpha=0.1, fg_colour=0xFF6600, fg_alpha=0.8, x=1145, y=200, radius=70, thickness=5, start_angle=-90, end_angle=90 }, { name='time', arg='%m', max=12, bg_colour=0xffffff, bg_alpha=0.1, fg_colour=0xFF6600, fg_alpha=1, x=1145, y=200, radius=76, thickness=5, start_angle=-90, end_angle=90 } } -- Use these settings to define the origin and extent of your clock. clock_r=65 -- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window. clock_x=1145 clock_y=200 show_seconds=true 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(cr,t,pt) local w,h=conky_window.width,conky_window.height local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle'] local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha'] local angle_0=sa*(2*math.pi/360)-math.pi/2 local angle_f=ea*(2*math.pi/360)-math.pi/2 local t_arc=t*(angle_f-angle_0) -- Draw background ring cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f) 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) end function draw_clock_hands(cr,xc,yc) local secs,mins,hours,secs_arc,mins_arc,hours_arc local xh,yh,xm,ym,xs,ys secs=os.date("%S") mins=os.date("%M") hours=os.date("%I") secs_arc=(2*math.pi/60)*secs mins_arc=(2*math.pi/60)*mins+secs_arc/60 hours_arc=(2*math.pi/12)*hours+mins_arc/12 -- Draw hour hand xh=xc+0.7*clock_r*math.sin(hours_arc) yh=yc-0.7*clock_r*math.cos(hours_arc) cairo_move_to(cr,xc,yc) cairo_line_to(cr,xh,yh) cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND) cairo_set_line_width(cr,5) cairo_set_source_rgba(cr,1.0,1.0,1.0,1.0) cairo_stroke(cr) -- Draw minute hand xm=xc+clock_r*math.sin(mins_arc) ym=yc-clock_r*math.cos(mins_arc) cairo_move_to(cr,xc,yc) cairo_line_to(cr,xm,ym) cairo_set_line_width(cr,3) cairo_stroke(cr) -- Draw seconds hand if show_seconds then xs=xc+clock_r*math.sin(secs_arc) ys=yc-clock_r*math.cos(secs_arc) cairo_move_to(cr,xc,yc) cairo_line_to(cr,xs,ys) cairo_set_line_width(cr,1) cairo_stroke(cr) end end function conky_clock_rings() local function setup_rings(cr,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(cr,pct,pt) end -- Check that Conky has been running for at least 5s if conky_window==nil then return end local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height) local cr=cairo_create(cs) local updates=conky_parse('${updates}') update_num=tonumber(updates) if update_num>5 then for i in pairs(settings_table) do setup_rings(cr,settings_table[i]) end end draw_clock_hands(cr,clock_x,clock_y) end
thanks to the original authors for having done this work
Last edited by rvchari; March 18th, 2011 at 04:48 AM. Reason: another conky which may be of interest to all
Ubuntu + Linux = UbunTux !!! Gr8 combo !!!
Yes, that's right
I have a question:
I'm using ppp0 for internet, so ${wireless_link_qual} variable won't work for me, right? Is there an available argument for monitoring ppp0 signal?
Because nm-applet on the panel can show me the signal quality. I scanned man page but didn't find a clue.
If the connection is called ppp0, typically it doesn't have a quality. It's just a network connection. If there's a specific program that has results, you can try to grep/awk the results. Preferably text-based program for this.
In fact, pretty much any text program that spits out a text result in the prompt can provide data for Conky. Uses the ${execi} command. It gets fun.
Sorry, I solved it not long after that last post. It was that argb like you suggested earlier. I had the line there but it was commented. I had to uncomment it.
The only other issue is that there is a slight shading under the conky. I don't think its window shadows as they are light blue plus it come up as soon as the conky is started (before it even fully loads). I think its to do with the conky area. Is there a way to fix it?Code:################################## ## VinDSL | rev. 10-12-30 20:45 ## ################################## #### ## Use XFT? Required to Force UTF8 (see below). # use_xft yes xftfont LiberationSans:size=8.85 xftalpha 0.7 text_buffer_size 2048 #### ## Force UTF8? Requires XFT (see above). ## Displays degree symbol, instead of °, etc. # override_utf8_locale yes #### ## Update interval in seconds. # update_interval 1 #### ## This is the number of times Conky will update before quitting. ## Set to zero to run forever. # total_run_times 0 #### ## Create own window instead of using desktop (required in nautilus)? # own_window yes #own_window_colour eeeeee #own_window_type normal own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager own_window_argb_visual yes #### ## Use double buffering? Reduces flicker. # double_buffer yes #### ## Draw shades? # draw_shades no #### ## Draw outlines? # draw_outline no #### ## Draw borders around text? # draw_borders no #### ## Draw borders around graphs? # draw_graph_borders no #### ## Print text to stdout? ## Print text in console? # out_to_ncurses no out_to_console no #### ## Text alignment. # alignment top_right #### ## Minimum size of text area. # minimum_size 235 0 #### ## Gap between text and screen borders. # gap_x 20 gap_y 40 #### ## Shorten MiB/GiB to M/G in stats. # short_units yes #### ## Pad % symbol spacing after numbers. # pad_percents 0 #### ## Pad spacing between text and borders. # border_inner_margin 4 #### ## Limit the length of names in "Top Processes". # top_name_width 10 #### ## Subtract file system -/+buffers/cache from used memory? ## Set to yes, to produce meaningful physical memory stats. # no_buffers yes #### ## Set to yes, if you want all text to be in UPPERCASE. # uppercase no #### ## Number of cpu samples to average. ## Set to 1 to disable averaging. # cpu_avg_samples 2 #### ## Number of net samples to average. ## Set to 1 to disable averaging. # net_avg_samples 2 #### ## Add spaces to keep things from moving around? ## Only affects certain objects. # use_spacer right #### ## My colors (suit yourself). # color0 White color1 Ivory color2 Ivory2 color3 Ivory3 color4 Tan1 color5 Tan2 color6 white color7 AntiqueWhite4 color8 DarkSlateGray color9 Black #### ## Load Lua for shading (optional). ## Set the path to your script here. # lua_load ~/.conky/combined.lua lua_draw_hook_pre combined #### ## Load Lua for bargraphs (required). ## Set the path to your script here. # #lua_load ~/.conky/bargraph_small.lua #lua_draw_hook_post main_bars #### ## Installed fonts (required). # # ConkyWeather (Stanko Metodiev) # ConkyWindNESW (Stanko Metodiev) # Cut Outs for 3D FX (Fonts & Things) # Liberation Mono (Ascender Corp) # Liberation Sans (Ascender Corp) # Moon Phases (Curtis Clark) # OpenLogos (Icoma) # PizzaDude Bullets (Jakob Fischer) # Radio Space (Iconian Fonts) # StyleBats (Vinterstille) # Ubuntu (Canonical Ltd) # Ubuntu Title Bold (Paulo Silva) # Weather (Jonathan Macagba) # WenQuanYi Micro Hei (Google Corp) TEXT ################## ## LOGO ## ################## ${voffset -33}${font OpenLogos:size=103}${color2}v${font}${voffset -76}${goto 178}${font UbuntuTitleBold:size=20}${color4}11.04${font} ################## ## SYSTEM ## ################## ${voffset 20}${font WenQuanYiMicroHei:bold:size=8.75}${color4}SYSTEM${offset 8}${color8}${voffset -2}${hr 2}${font} ${voffset 4}${font OpenLogos:size=10}${color2}u${voffset -4}${font}${color6}${offset 5}${sysname}${offset 5}${kernel}${alignr}${machine} ${voffset 2}${font StyleBats:size=10}${color2}A${voffset -1}${font}${color6}${offset 5}Intel${offset 3}P4${offset 3}Extreme${offset 3}Edition${alignr}${freq_g cpu0}${offset 1}GHz ${voffset 2}${font StyleBats:size=10}${color2}q${voffset -1}${font}${color6}${offset 5}Uptime${alignr}${uptime} ${voffset 2}${font StyleBats:size=10}${color2}o${voffset -1}${font}${color6}${offset 5}File${offset 3}System${alignr}${fs_type} ${voffset 2}${font StyleBats:size=10}${color2}b${voffset -1}${font}${color6}${offset 5}Updates${alignr}${execi 5 aptitude search "~U" | wc -l | tail} ################## ## PROCESSORS ## ################## ${voffset 6}${font WenQuanYiMicroHei:bold:size=8.75}${color4}PROCESSORS${offset 8}${color8}${voffset -2}${hr 2}${font} ${voffset 4}${font StyleBats:size=10}${color2}k${voffset -2}${font}${color6}${offset 2}CPU1${offset 5}${cpu cpu1}% ################## ## MEMORY ## ################## ${voffset 6}${font WenQuanYiMicroHei:bold:size=8.75}${color4}MEMORY${offset 8}${color8}${voffset -2}${hr 2}${font} ${voffset 4}${font StyleBats:size=10}${color2}l${voffset -2}${font}${color6}${offset 3}RAM${goto 97}${mem}${goto 133}/${offset 5}${memmax}${alignr}${memperc}% ################## ## HDD ## ################## ${voffset 2}${font WenQuanYiMicroHei:bold:size=8.75}${color4}HDD${offset 8}${color8}${voffset -2}${hr 2}${font} ${voffset 4}${font StyleBats:size=10}${color2}x${voffset -2}${font}${color6}${offset 4}ROOT${goto 95}${fs_used /}${goto 133}/${offset 5}${fs_size /}${alignr}${fs_free_perc /}% ${voffset 4}${font StyleBats:size=10}${color2}x${voffset -2}${font}${color6}${offset 4}HOME${goto 95}${fs_used /home}${goto 133}/${offset 5}${fs_size /home}${alignr}${fs_free_perc /home}% ################## # TOP PROCESSES ## ################## ${voffset 3}${font WenQuanYiMicroHei:bold:size=8.75}${color4}TOP PROCESSES${offset 8}${color8}${voffset -2}${hr 2}${font} ${voffset 4}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 1}${goto 115}${top_mem mem_res 1}${alignr}${top_mem mem 1}% ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 2}${goto 115}${top_mem mem_res 2}${alignr}${top_mem mem 2}% ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 3}${goto 115}${top_mem mem_res 3}${alignr}${top_mem mem 3}% ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 4}${goto 115}${top_mem mem_res 4}${alignr}${top_mem mem 4}% ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 5}${goto 115}${top_mem mem_res 5}${alignr}${top_mem mem 5}% ################## ## NETWORK ## ################## ${voffset 6}${font WenQuanYiMicroHei:bold:size=8.75}${color4}NETWORK${offset 8}${color8}${voffset -2}${hr 2}${font} ${voffset 4}${font PizzaDudeBullets:size=10}${color2}a${font}${color6}${offset 5}Private${offset 3}IP${alignr}${addr wlan0} ${font PizzaDudeBullets:size=10}${color2}a${font}${color6}${offset 5}Public${offset 7}IP${alignr}${execi 1800 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'} ${voffset 4}${font PizzaDudeBullets:size=10}${color2}T${font}${color6}${offset 5}Down${alignr}${downspeed wlan0} ${font PizzaDudeBullets:size=10}${color2}N${font}${color6}${offset 5}Up${alignr}${upspeed wlan0} ################## ## WEATHER ## ################## #${voffset 6}${font WenQuanYiMicroHei:bold:size=8.75}${color4}WEATHER${offset 8}${color8}${voffset -2}${hr 2}${font} #${voffset 0}${goto 59}${font Weather:size=38}${color2}y${font}${voffset -33}${offset 14}${font RadioSpace:size=32}${color3}${execpi 1800 conkyForecast --imperial --location=NZXX0069}${font} #${voffset 0}${font Ubuntu:size=24}${color4}${alignc}${execi 1800 conkyForecast --location=NZXX0069 --datatype=CT}${font} #${voffset 15}${goto 20}${font ConkyWindNESW:style=Bold:size=38}${color2}${execi 1800 conkyForecast --location=NZXX0069 --datatype=BS}${font}${voffset -40}#${goto 95}${font ConkyWeather:style=Bold:size=45}${execi 1800 conkyForecast --location=NZXX0069 --datatype=WF}${font}${voffset -36}${goto 185}${font MoonPhases:size=30}${execi 1800 conkyForecast --location=NZXX0069 --datatype=75MF}${font} #${voffset 6}${goto 28}${font}${color6}${execpi 1800 conkyForecast --location=NZXX0069 --imperial --datatype=WS | sed -e 's/calm'/'\$\{offset 2}Calm/g' -e 's/mph'/'\$\{offset 2}mph/g'}${goto 89}Feels like ${execi 1800 conkyForecast --location=NZXX0069 --imperial --datatype=LT --centeredwidth=4 -iu}${execpi 1800 conkyForecast --location=NZXX0069 --datatype=MP | sed -e 's/First.*'/'\$\{goto 185}First Qtr/g' -e 's/Last.*'/'\$\{goto 185}Last Qtr/g' -e 's/New.*'/'\$\{goto 190}New/g' -e 's/Full.*'/'\$\{goto 194}Full/g' -e 's/Waning.*'/'\$\{goto 185}Waning/g' -e 's/Waxing.*'/'\$\{goto 185}Waxing/g'} #${voffset 10}${goto 35}${font}${color6}${execi 1800 conkyForecast --location=NZXX0069 --datatype=DW --startday=1 --shortweekday}${goto 89}${execi 1800 conkyForecast --location=NZXX0069 --datatype=DW --startday=2 --shortweekday}${goto 142}${execi 1800 conkyForecast --location=NZXX0069 --datatype=DW --startday=3 --shortweekday}${goto 196}${execi 1800 conkyForecast --location=NZXX0069 --datatype=DW --startday=4 --shortweekday} #${voffset 0}${goto 25}${font ConkyWeather:size=32}${color2}${execi 1800 conkyForecast --location=NZXX0069 --datatype=WF --startday=1 --endday=4 --spaces=1}${font} #${voffset 0}${goto 25}${font}${color6}${execi 1800 conkyForecast --location=NZXX0069 --imperial --datatype=HT --startday=1 --hideunits --centeredwidth=4 -iu}/${offset 4}${execi 1800 conkyForecast --location=NZXX0069 --imperial --datatype=LT --startday=1 --hideunits --centeredwidth=4 -iu}${goto 79}${execi 1800 conkyForecast --location=NZXX0069 --imperial --datatype=HT --startday=2 --hideunits --centeredwidth=4 -iu}/${offset 4}${execi 1800 conkyForecast --location=NZXX0069 --imperial --datatype=LT --startday=2 --hideunits --centeredwidth=4 -iu}${goto 133}${execi 1800 conkyForecast --location=NZXX0069 --imperial --datatype=HT --startday=3 --hideunits --centeredwidth=4 -iu}/${offset 4}${execi 1800 conkyForecast --location=NZXX0069 --imperial --datatype=LT --startday=3 --hideunits --centeredwidth=4 -iu}${goto 187}${execi 1800 conkyForecast --location=NZXX0069 --imperial --datatype=HT --startday=4 --hideunits --centeredwidth=4 -iu}/${offset 4}${execi 1800 conkyForecast --location=NZXX0069 --imperial --datatype=LT --startday=4 --hideunits --centeredwidth=4 -iu} ################## ## TIME ## ################## ${voffset 6}${font WenQuanYiMicroHei:bold:size=8.75}${color4}TIME${offset 8}${color8}${voffset -2}${hr 2}${font} ${voffset 3}${if_match ${time %l}<=9}${voffset -4}${font RadioSpace:size=32}${color3}${alignc 7}${time %l:%M%p}${font}${else}${if_match ${time %l}>=10}${voffset -4}${font RadioSpace:size=32}${color3}${alignc -1}${time %l:%M%p}${font}${endif}${endif} ${voffset 0}${font LiberationSans:bold:size=10}${color4}${alignc}${offset 30}DAD${offset -30}${voffset 15}${tztime Australia/Queensland %H:%M}${color3}${offset 12}|${voffset -15}${offset -4}|${offset 10}${color4}Hoggad${offset -40}${voffset 15}${tztime America/Rainy_River %H:%M}${font} ################## ## CALENDAR ## ################## ${voffset 6}${font WenQuanYiMicroHei:bold:size=8.75}${color4}DATE${offset 8}${color8}${voffset -2}${hr 2}${font} ${voffset 18}${font LiberationMono:size=8}${color3}${alignc 67}${time %A}${font} ${voffset -3}${font LiberationMono:size=22}${color4}${alignc 67}${time %d}${font} ${voffset -1}${font LiberationMono:size=8}${color3}${alignc 67}${time %B}${font} ${voffset -3}${font LiberationMono:size=8}${color3}${alignc 67}${time %Y}${font} ${voffset -79}${font CutOutsFor3DFX:size=64}${color3}${alignc 105}2${font} ${voffset -69}${font LiberationMono:size=8}${color3}${execpi 1800 VinDSL_Cal_4= cal -h | sed '1d' | sed s/^/"\$\{offset 97"\}/ | sed '/^ *$/d' | sed 's/\<'"$(date +%-d)"'\>/${color4}&${color3}/'}${font} ${texeci 1000 feh --bg-scale "`grep 'wallpaper=' ~/.kde/share/config/plasma-desktop-appletsrc | tail --bytes=+11`"}
Ubuntu 16.04 / Linux 18
“To mess up a Linux box, you need to work at it; to mess up your Windows
box, you just need to work on it”.
is there some command that's ment to come before the gm? cause it isn't red like the wget commandYou could install graphicmagick from the repositories and then add a gm command to the script to crop it.
See http://www.graphicsmagick.org/convert.html
Here is what it says about cropping:
crop <width>x<height>{+-}<x>{+-}<y>{%}
preferred size and location of the cropped image
__________________
Thank you,
GG
Dell Inspiron 1520
Code:wget -q http://sohowww.nascom.nasa.gov/data/realtime/eit_304/512/latest.jpg -O /home/me/john/sun.jpg gm -crop <width>x<height>{+-}<x>{+-}<y>{%}
Last edited by karmila; March 18th, 2011 at 09:18 AM.
I think it's the window drawn by the argb setting (I used your conkyrc with Xfce compositing); you do not want to use:
with the argb - pick one or the other; and since you're using lua for a semi-transparent background there is no need to duplicate it with the argb configuration.Code:own_window_transparent yes
Try changing:
to:Code:own_window yes #own_window_colour eeeeee #own_window_type normal own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager own_window_argb_visual yes
and see if that works.Code:own_window yes own_window_colour eeeeee own_window_type normal own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
Also, if you decide you are going to use argb instead, then
will need to be given a value from 0-255 with something like:Code:own_window_argb_visual yes
Code:own_window_argb_value 10
Last edited by ddnev45; March 18th, 2011 at 02:36 PM.
The mark of an honest man ... is that he means what he says and knows what he means.
A.R.
Last edited by mrpeachy; March 18th, 2011 at 03:15 PM.
Bookmarks