You are not logged in.
dodo3773 wrote:Sector11 wrote:Thank you!
You are welcome. If you have any questions let me know.
OK, one question - Hows this: Featured, for a week and Gallery 2011-2 until .... whenever?
I do not understand the question. I did not put my post there. I am glad other people like it though. If you are asking me if that's cool that it's there then the answer is yes. I am glad to share. Leave it there as long as you wish.
Edit: I figured it out. Yeah that's cool.
Edit: Found an error in the scripts tcpipcomplete and newnetcat. The lines that are for LAN and for Local Host should be changed.
This:
'192\.168\.*'
grep -w $ports
and
'127\.0\.*'
grep -w $ports
in that section should be changed to:
'^192\.168\.*'
grep $ports
and
'^127\.0\.*'
grep $ports
Last edited by dodo3773 (2011-08-01 21:47:41)
Offline
Sector11 wrote:dodo3773 wrote:You are welcome. If you have any questions let me know.
OK, one question - Hows this: Featured, for a week and Gallery 2011-2 until .... whenever?
I do not understand the question. I did not put my post there. I am glad other people like it though. If you are asking me if that's cool that it's there then the answer is yes. I am glad to share. Leave it there as long as you wish.
Edit: I figured it out. Yeah that's cool.
Sorry, for the confusion, it was not my intent. Your conky is unique, so I thought it would make a nice addition to Conky PitStop.
Edit: Found an error in the scripts tcpipcomplete and newnetcat. The lines that are for LAN and for Local Host should be changed.
This:'192\.168\.*' grep -w $ports
and
'127\.0\.*' grep -w $ports
in that section should be changed to:
'^192\.168\.*' grep $ports
and
'^127\.0\.*' grep $ports
I didn't find exactly what you mentioned, what I did find is these:
httprange=$( echo "-e" '192\.168\.*' )
ports=$( echo "$httprange" )
grepped=$( netstat --tcp --numeric | awk 'NR>2 {print $5}' | grep -w $ports | sort -n -t : -k 2,2 | uniq )
and
httprange=$( echo "-e" '127\.0\.*' )
ports=$( echo "$httprange" )
grepped=$( netstat --tcp --numeric | awk 'NR>2 {print $5}' | grep -w $ports | sort -n -t : -k 2,2 | uniq )
... in each script: tcpipcomplete and newnetcat - being as that code may as well be "martian" for me (no offence to any martians who may be present) I understood none of it. But if you are saying the only thing to do is add the ^ in there?
'^192\.168\.*'
and
'^127\.0\.*'
... and change the part:
grep -w $ports
to
grep $ports
... the changes are made here and waiting for your OK to be uploaded to CPS.
Last edited by Sector11 (2011-08-02 13:34:54)
Offline
... the changes are made here and waiting for your OK to be uploaded to CPS.
Exactly, you found the right 2 parts. It should be good now.
Offline
Sector11 wrote:... the changes are made here and waiting for your OK to be uploaded to CPS.
Exactly, you found the right 2 parts. It should be good now.
Perfect - and new version uploaded. Thanks
Offline
Nothing really extraordinary in the conkyrc, but I'm quite proud the result with lua and cairo bindings !
Conky is used as the desktop and using transparency. Compiz has the cube enabled with opacity=0, and the wallpaper plugin with a transparent background (it's necessary for conky to be displayed on top of this desktop window, handled by compiz).
The earth you see in the background is a plugin for compiz I made, it's a realtime lit 3D earth model, according to the date and time. You can see it in action here (although the video is a bit flickery due to the recording) : https://www.youtube.com/watch?v=_LEit10e_CE
conkyrc :
background no
border_width 0
cpu_avg_samples 2
default_color grey
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont Impact:size=12
minimum_size 1680 1050
gap_x 5
gap_y 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window yes
own_window_class Conky
own_window_type desktop
own_window_argb_visual yes
own_window_transparent yes
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no
lua_load ~/.config/conky/conky.lua
lua_draw_hook_pre init
TEXT
${color white}Noyau:$color $kernel
${color white}Uptime:$color $uptime
${color white}Charge:$color $loadavg
${offset 1200}${color white}Frequence:$color $freq_g GHz
${offset 1210}${color white}CPU 1:$color ${cpu cpu1}% ${cpubar cpu1 4, 340} ${hwmon 0 temp 1}-${hwmon 0 temp 2}°C
${offset 1220}${color white}CPU 2:$color ${cpu cpu2}% ${cpubar cpu2 4, 330} ${hwmon 0 temp 3}-${hwmon 0 temp 4}°C
${offset 1230}${color white}Name PID CPU% MEM%$color
${offset 1240} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${offset 1250} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${offset 1260} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color white}RAM:$color $mem/$memmax - $memperc% ${membar 4, 150}
${color white}Swap:$color $swap/$swapmax - $swapperc% ${swapbar 4, 135}
${color white}Name PID CPU% MEM%$color
${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
${offset 1320} ${fs_used /}/${fs_size /} ${fs_bar 6, 150 /}
${offset 1320}/var ${fs_used /var}/${fs_size /var} ${fs_bar 6, 160 /var}
${offset 1320} ${fs_used /home}/${fs_size /home} ${fs_bar 6, 160 /home}
${upspeed eth0}
${downspeed eth0}
Total Up: ${totalup eth0} - Total Down: ${totaldown eth0}
${image /home/satamaxx/.icons/ALLWHITE/scalable/devices/computer.png -p 1320,484 -s 20x20}
${image /home/satamaxx/.icons/ALLWHITE/scalable/places/user-home.png -p 1320,522 -s 20x20}
${image /home/satamaxx/.icons/ALLWHITE/scalable/actions/up.png -p 10,556 -s 20x20}
${image /home/satamaxx/.icons/ALLWHITE/scalable/actions/down.png -p 10,578 -s 20x20}
conky.lua :
require 'cairo'
function conky_init()
cr, cs = nil
param = {y_decal = 0,
nbcpu = 2,
pi = 3.141592,
radius = 475,
wx = 1680,
wy = 1050}
if conky_window == nil then return end
if cs == nil or cairo_xlib_surface_get_width(cs) ~= conky_window.width or cairo_xlib_surface_get_height(cs) ~= conky_window.height then
if cs then cairo_surface_destroy(cs) end
cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
end
if cr then cairo_destroy(cr) end
cr = cairo_create(cs)
general(-1, 70)
cpu(1, 135)
mem(-1, 310)
disks(1, 465)
net(-1, 540)
cairo_destroy(cr)
cr = nil
cairo_surface_destroy(cs)
cs = nil
end
function general(orientation, position)
local x1, x2 = draw_cadre(orientation, position, 100)
cairo_select_font_face (cr, "Impact", CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 20);
cairo_move_to (cr, x1 + orientation*10, position + 8)
if orientation == -1 then cairo_rel_move_to (cr, -70, 0) end
cairo_text_path (cr, "General")
cairo_set_source_rgb(cr, 1,1,1)
cairo_set_line_width(cr, 2)
cairo_stroke_preserve(cr)
cairo_set_source_rgb(cr, 0,0,0)
cairo_fill(cr)
end
function cpu(orientation, position)
local x1, x2 = draw_cadre(orientation, position, 160)
cairo_select_font_face (cr, "Impact", CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 20);
cairo_set_source_rgb(cr, 0,0,0)
cairo_move_to (cr, x1 + orientation*10, position + 8)
if orientation == -1 then cairo_rel_move_to (cr, -30, 0) end
cairo_text_path (cr, "CPU")
cairo_set_source_rgb(cr, 1,1,1)
cairo_set_line_width(cr, 2)
cairo_stroke_preserve(cr)
cairo_set_source_rgb(cr, 0,0,0)
cairo_fill(cr)
end
function mem(orientation, position)
local x1, x2 = draw_cadre(orientation, position, 150)
cairo_select_font_face (cr, "Impact", CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 20);
cairo_set_source_rgb(cr, 0,0,0)
cairo_move_to (cr, x1 + orientation*10, position + 8)
if orientation == -1 then cairo_rel_move_to (cr, -75, 0) end
cairo_text_path (cr, "Memoire")
cairo_set_source_rgb(cr, 1,1,1)
cairo_set_line_width(cr, 2)
cairo_stroke_preserve(cr)
cairo_set_source_rgb(cr, 0,0,0)
cairo_fill(cr)
end
function disks(orientation, position)
local x1, x2 = draw_cadre(orientation, position, 100)
cairo_select_font_face (cr, "Impact", CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 20);
cairo_set_source_rgb(cr, 0,0,0)
cairo_move_to (cr, x1 + orientation*10, position + 8)
if orientation == -1 then cairo_rel_move_to (cr, -70, 0) end
cairo_text_path (cr, "Disques")
cairo_set_source_rgb(cr, 1,1,1)
cairo_set_line_width(cr, 2)
cairo_stroke_preserve(cr)
cairo_set_source_rgb(cr, 0,0,0)
cairo_fill(cr)
end
function net(orientation, position)
local x1, x2 = draw_cadre(orientation, position, 100)
cairo_select_font_face (cr, "Impact", CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 20);
cairo_set_source_rgb(cr, 0,0,0)
cairo_move_to (cr, x1 + orientation*10, position + 8)
if orientation == -1 then cairo_rel_move_to (cr, -60, 0) end
cairo_text_path (cr, "Reseau")
cairo_set_source_rgb(cr, 1,1,1)
cairo_set_line_width(cr, 2)
cairo_stroke_preserve(cr)
cairo_set_source_rgb(cr, 0,0,0)
cairo_fill(cr)
end
function meteo(orientation, position)
local x1, x2 = draw_cadre(orientation, position, 100)
cairo_select_font_face (cr, "Impact", CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 20);
cairo_set_source_rgb(cr, 0,0,0)
cairo_move_to (cr, x1 + orientation*10, position + 8)
if orientation == -1 then cairo_rel_move_to (cr, -70, 0) end
cairo_text_path (cr, "Meteo")
cairo_set_source_rgb(cr, 1,1,1)
cairo_set_line_width(cr, 2)
cairo_stroke_preserve(cr)
cairo_set_source_rgb(cr, 0,0,0)
cairo_fill(cr)
end
function draw_cadre(orientation, position, hauteur)
local xc = param.wx / 2
local yc = param.wy / 2 - param.y_decal
local a1 = math.asin((position-yc)/param.radius)
local a2 = math.asin(((position+hauteur)-yc)/param.radius)
local x1 = math.cos(a1)*param.radius
local x2 = math.cos(a2)*param.radius
local largeur = param.wx - (x2 + xc)
if orientation == 1 then
x1 = x1 + xc
x2 = x2 + xc
cairo_move_to(cr, x1, position)
cairo_arc(cr, xc, yc, param.radius, a1, a2)
cairo_rel_line_to(cr, largeur, 0)
cairo_rel_line_to(cr, 0, -hauteur)
cairo_close_path(cr)
cairo_set_source_rgba(cr, .09, .57, .82, .5)
cairo_fill_preserve(cr)
cairo_set_line_join(cr, CAIRO_LINE_JOIN_BEVEL)
cairo_set_line_width(cr, 20)
local pat = cairo_pattern_create_linear(x1, position + hauteur/2, param.wx, position + hauteur/2)
cairo_pattern_add_color_stop_rgba (pat, 0, .09, .57, .82, 1)
cairo_pattern_add_color_stop_rgba (pat, 1, .09, .57, .82, 0)
cairo_set_source(cr, pat)
cairo_stroke(cr)
else
a1 = param.pi - a1
a2 = param.pi - a2
x1 = xc - x1
x2 = xc - x2
cairo_move_to(cr, x1, position)
cairo_arc_negative(cr, xc, yc, param.radius, a1, a2)
cairo_rel_line_to(cr, -largeur, 0)
cairo_rel_line_to(cr, 0, -hauteur)
cairo_close_path(cr)
cairo_set_source_rgba(cr, .09, .57, .82, .5)
cairo_fill_preserve(cr)
cairo_set_line_join(cr, CAIRO_LINE_JOIN_BEVEL)
cairo_set_line_width(cr, 20)
local pat = cairo_pattern_create_linear(x1, position + hauteur/2, 0, position + hauteur/2)
cairo_pattern_add_color_stop_rgba (pat, 0, .09, .57, .82, 1)
cairo_pattern_add_color_stop_rgba (pat, 1, .09, .57, .82, 0)
cairo_set_source(cr, pat)
cairo_stroke(cr)
end
return x1, x2
end
Last edited by SataMaxx (2011-08-07 16:39:58)
Offline
Hi, is it possible to have conky list the top 3 best wireless networks that are available? I cant seem to figure this out on my own
Offline
Hi, is it possible to have conky list the top 3 best wireless networks that are available? I cant seem to figure this out on my own
Yes it is. Do you use networkmanager (nmcli)?
Last edited by dodo3773 (2011-08-19 18:46:18)
Offline
No, I use wicd
Offline
${execi 20 /usr/bin/wicd-cli -yl}
Will list all networks and refresh every 20 seconds, but it doesn't seem to show signal strength.
This Is My Truth, Tell Me Yours
Offline
Ah, thnx, that helped me a lot, but the strenght part would be nice. I will try to dig into that.
Offline
No, I use wicd
Might not be possible with wicd-cli. Try iwlist scan.
Need to be sudo / root for iwlist. But it should work even though you are using wicd
sudo iwlist wlan0 scan | grep -e "Address" -e "ESSID" -e "Quality" | tr "\n" " "| sed s/Cell/\\n/g | awk '{print $4,$9,$10,$11,$12,$13,$5}' | sed -e "s/ESSID://g" -e "s/Quality=//g" -e "s/...$//g" -e "s/\"//g" | awk '{print $NF,$0}' | sort -nr | cut -f2- -d' ' | head -n 3
or nmcli (unless you decide to switch to networkmanager you should probably stick with the iwlist one ).
nmcli -f SSID,BSSID,SECURITY,SIGNAL dev wifi | awk '{print $NF,$0}' | sort -nr | cut -f2- -d' ' |sed -e "s/'//" -e "s/'//" -e "/SSID/d" | awk '!x[$1]++'| head -n 3
If you want to run it over and over again just pipe your password to sudo
echo password | sudo -S command
Last edited by dodo3773 (2011-08-23 21:57:08)
Offline
Still a work in progress, pacman script needs some more tweaking... can't find a way to leave loop right when pacman starts running, thus some updates are missed if your internet is pretty fast. I'm sure I left a lot some commenting incomplete, was working on most of them at the same time, alternating between ideas. Just thought it'd be fun to practice around with some bash scripts to get my screen the way I wanted it.
the conkyright config is a modded version of the VinDSL conky config that I used as a base and my first conkyrc
Can't seem to get rid of caret block at end of panel.
May try to do something like album art for first 15 secs when song changes, just gotta figure it out.
the conkylogs config isn't satisfactory to me, just a temp to show blocked ip addresses for now
the configs and scripts used, as well as others I've wrote can be found on my github (just setup today):
note that I'm using a 1360x768 32inch hdtv, so they won't work for everyone without some mods, but the scripts should work fine for your own configs if anyones interested in them.
feel free to point out any mistakes or improvements you see in the scripts, I'ts just a way for me to learn some shell scripting, I'm constantly going through them on my spare time to adjust them.
Last edited by bluTaz (2021-04-29 22:27:24)
“Knowledge comes by eyes always open and working hands; and there is no knowledge that is not power.”
~ Ralph Waldo Emerson
Offline
the config was already linked to in the post you quoted but here is my adaptation - the original work is by nale12 and this edit is by me...
conky
# -- 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 # -- Window specifications -- # own_window yes own_window_type desktop own_window_transparent yes own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below border_inner_margin 0 border_outer_margin 0 minimum_size 320 800 maximum_width 320 alignment top_right gap_x 0 gap_y 0 # -- Graphics settings -- # draw_shades no draw_outline no draw_borders no draw_graph_borders yes # -- Text settings -- # use_xft yes xftfont Sans:size=24 xftalpha 0.4 uppercase no #colors #good blue 1994d1 #medium blue 083146 #dark blue 041e2c #lime 86c113 color1 cdcdcd color2 86c113 color3 1994d1 color4 aa0000 default_color EEEEEE # -- Lua Load -- # lua_load ~/.conky/nale.lua lua_draw_hook_pre ring_stats TEXT ${image ~/.conky/conky-img.png -p 0,0 -f 86400} ${voffset 10}${goto 168}${font Digital Readout Thick Upright:size=18}${color3}${time %H}${color2}${time %M} ${voffset 14} ${color1}${voffset -40}${goto 120}${font Nu:size=9}Mail:${offset 70}Updates: ${goto 118}${font Nu:size=9}${execpi 25 cat ~/mybin/gmail-chris} | ${execpi 20 cat ~/mybin/gmail-tawan}${offset 86}${execpi 30 cat ~/mybin/pacman-status} ${voffset 57}${goto 117}${font snap:size=8}${color2}${cpu cpu1}% ${goto 117}${color3}${cpu cpu2}% ${goto 117}${color}CPU ${voffset 19}${goto 145}${color2}${memperc}% ${goto 145}${color3}$swapperc% ${goto 145}${color}MEM ${voffset 25}${goto 170}${color4}${acpitemp} C ${goto 170}${color}TEMP ${voffset 27}${goto 198}${color2}${downspeedf wlan0} ${goto 198}${color3}${upspeedf wlan0} ${goto 205}${color}NET ${voffset 21}${goto 222}${color2}${fs_used /home/tawan/Data/} ${goto 222}${color3}${fs_used /} ${goto 230}${color}DISK
lua
--[[ 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-v1.2.1.lua lua_draw_hook_pre ring_stats Changelog: + v1.2.1 -- Fixed minor bug that caused script to crash if conky_parse() returns a nil value (20.10.2009) + v1.2 -- Added option for the ending angle of the rings (07.10.2009) + 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) ]] conky_background_color = 0x151515 conky_background_alpha = 0 ring_background_color = 0x424242 ring_background_alpha = 0.9 ring_foreground_color = 0x86c113 ring_foreground_color2 = 0x1994d1 ring_foreground_color3 = 0xaa0000 ring_foreground_alpha = 1 settings_table = { { name='time', arg='%S', max=60, bg_colour=ring_background_color, bg_alpha=ring_background_alpha, fg_colour=ring_foreground_color, fg_alpha=ring_foreground_alpha, x=191, y=145, radius=40, thickness=12, start_angle=0, end_angle=360 }, { name='time', arg='%I.%M', max=12, bg_colour=ring_background_color, bg_alpha=ring_background_alpha, fg_colour=ring_foreground_color2, fg_alpha=ring_foreground_alpha, x=191, y=145, radius=50, thickness=5, start_angle=-140, end_angle=-30 }, { name='time', arg='%M.%S', max=60, bg_colour=ring_background_color, bg_alpha=ring_background_alpha, fg_colour=ring_foreground_color, fg_alpha=ring_foreground_alpha, x=191, y=145, radius=50, thickness=5, start_angle=30, end_angle=140 }, { name='cpu', arg='cpu1', max=100, bg_colour=ring_background_color, bg_alpha=ring_background_alpha, fg_colour=ring_foreground_color, fg_alpha=ring_foreground_alpha, x=140, y=300, radius=26, thickness=5, start_angle=-90, end_angle=180 }, { name='cpu', arg='cpu2', max=100, bg_colour=ring_background_color, bg_alpha=ring_background_alpha, fg_colour=ring_foreground_color2, fg_alpha=ring_foreground_alpha, x=140, y=300, radius=20, thickness=5, start_angle=-90, end_angle=180 }, { name='memperc', arg='', max=100, bg_colour=ring_background_color, bg_alpha=ring_background_alpha, fg_colour=ring_foreground_color, fg_alpha=ring_foreground_alpha, x=170, y=350, radius=26, thickness=5, start_angle=-90, end_angle=180 }, { name='swapperc', arg='', max=100, bg_colour=ring_background_color, bg_alpha=ring_background_alpha, fg_colour=ring_foreground_color2, fg_alpha=ring_foreground_alpha, x=170, y=350, radius=20, thickness=5, start_angle=-90, end_angle=180 }, { name='fs_used_perc', arg='/', max=100, bg_colour=ring_background_color, bg_alpha=ring_background_alpha, fg_colour=ring_foreground_color2, fg_alpha=ring_foreground_alpha, x=260, y=503, radius=20, thickness=5, start_angle=-90, end_angle=180 }, { name='fs_used_perc', arg='/home/tawan/Data/', max=100, bg_colour=ring_background_color, bg_alpha=ring_background_alpha, fg_colour=ring_foreground_color, fg_alpha=ring_foreground_alpha, x=260, y=503, radius=26, thickness=5, start_angle=-90, end_angle=180 }, { name='upspeedf', arg='wlan0', max=200, bg_colour=ring_background_color, bg_alpha=ring_background_alpha, fg_colour=ring_foreground_color2, fg_alpha=ring_foreground_alpha, x=230, y=452, radius=20, thickness=5, start_angle=-90, end_angle=180 }, { name='downspeedf', arg='wlan0', max=800, bg_colour=ring_background_color, bg_alpha=ring_background_alpha, fg_colour=ring_foreground_color, fg_alpha=ring_foreground_alpha, x=230, y=452, radius=26, thickness=5, start_angle=-90, end_angle=180 }, { name='acpitemp', arg='', max=100, bg_colour=ring_background_color, bg_alpha=ring_background_alpha, fg_colour=ring_foreground_color3, fg_alpha=ring_foreground_alpha, x=200, y=401, radius=26, thickness=6, start_angle=-90, end_angle=180 }, } 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 conky_ring_stats() 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) if value == nil then value = 0 end pct=value/pt['max'] draw_ring(cr,pct,pt) end 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 end
Great work, were is the fonts and image?
Offline
Guys I want simple horizontal conky, i tried most of them from this discussions but most of them are not working properly. Just a simple horizontal conky nothing else..!!
Offline
Guys I want simple horizontal conky, i tried most of them from this discussions but most of them are not working properly. Just a simple horizontal conky nothing else..!!
Here is my old ~/.conkyrc which was horizontal. I went to a tiling-wm (Xmonad) and I have changed my conky since. http://pastebin.com/NUQEMjEX
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
creative2innovative wrote:Guys I want simple horizontal conky, i tried most of them from this discussions but most of them are not working properly. Just a simple horizontal conky nothing else..!!
Here is my old ~/.conkyrc which was horizontal. I went to a tiling-wm (Xmonad) and I have changed my conky since. http://pastebin.com/NUQEMjEX
do i have to install anything extra for it ?? i did but nothing works, conky is not showing up.
Offline
securitybreach wrote:creative2innovative wrote:Guys I want simple horizontal conky, i tried most of them from this discussions but most of them are not working properly. Just a simple horizontal conky nothing else..!!
Here is my old ~/.conkyrc which was horizontal. I went to a tiling-wm (Xmonad) and I have changed my conky since. http://pastebin.com/NUQEMjEX
do i have to install anything extra for it ?? i did but nothing works, conky is not showing up.
That would be because you have to tweak it for your partitions, etc.
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
creative2innovative wrote:securitybreach wrote:Here is my old ~/.conkyrc which was horizontal. I went to a tiling-wm (Xmonad) and I have changed my conky since. http://pastebin.com/NUQEMjEX
do i have to install anything extra for it ?? i did but nothing works, conky is not showing up.
That would be because you have to tweak it for your partitions, etc.
But atleast the conky must show up. it's not showing up completly. what is lua in the conky ??
Offline
It will not show up if there are errors. Try running it from the terminal and note the errors.
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
Guys I want simple horizontal conky, i tried most of them from this discussions but most of them are not working properly. Just a simple horizontal conky nothing else..!!
I see you got some help. I figured that would happen, conky people seem to like helping.
Here's one I posted yesterday on the #! forums, I'll link to it rather than re-post everything:
conky calendar and a simple one liner
and PackRat has his too, a post or two earlier.
Offline
It will not show up if there are errors. Try running it from the terminal and note the errors.
i started conk from terminal by typing conky and conky & . as i type and press enter everything flickers and goes blank.
Offline
creative2innovative wrote:Guys I want simple horizontal conky, i tried most of them from this discussions but most of them are not working properly. Just a simple horizontal conky nothing else..!!
I see you got some help. I figured that would happen, conky people seem to like helping.
Here's one I posted yesterday on the #! forums, I'll link to it rather than re-post everything:
conky calendar and a simple one liner
and PackRat has his too, a post or two earlier.
thanks for your positive response i tried your link but can't figure out what should i be doing. If possible can you tell me the most simple horizontal conky which display's the basic things. I don't want to get into more customization stuff.
Offline
thanks for your positive response i tried your link but can't figure out what should i be doing. If possible can you tell me the most simple horizontal conky which display's the basic things. I don't want to get into more customization stuff.
OK, try this:
Make a folder: ~/conky and put this file in there called: top1
Open a terminal and start it:
conky -c ~/conky/top1 &
# killall conky && conky -c ~/conky/top1 &
background no
own_window yes
own_window_type override # desktop dock panel override normal
own_window_transparent yes
own_window_colour yellow
own_window_hints below,skip_taskbar,skip_pager
own_window_title top
own_window_class top
double_buffer yes
use_spacer right
override_utf8_locale yes
use_xft yes
xftfont DejaVu Sans Mono:bold:size=8
xftalpha 1.0
update_interval 1
uppercase no
stippled_borders 0
border_inner_margin 0
border_width 0
default_outline_color black
default_shade_color black
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
# Colors
default_color DCDCDC #Gainsboro
color0 7FFF00 #Chartreuse
color1 FFA07A #LightSalmon
color2 FF8C00 #Darkorange
color3 778899 #LightSlateGrey
color4 FFD700 #Gold
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
text_buffer_size 1028
no_buffers yes
short_units yes
pad_percents 2
alignment tm
gap_x 00
gap_y 5
minimum_size 675 0
maximum_width 675
TEXT
${color3}CPU: ${color7}${cpu cpu0}${goto 50}${color3}% RAM: ${color7}${memperc} ${color3}${goto 110}% Disk: ${color7}${fs_used_perc /}${goto 176}${color3}% ${color7}Temps: ${color3}CPU: ${color7}${execpi 8 sensors | grep 'Core0' | cut --characters 15-16}°${goto 290}${color3}GPU: ${color7}${execpi 8 sh -c "DISPLAY=:0.0 nvclock -T | grep GPU | cut -c21-22"}°${goto 350}${color3}SDA: ${color7}${execpi 8 hddtemp -n /dev/sda}°${goto 410}${color3}eth0: ${color7}${addr eth0} ${color3}UP${color6}/${color6}DN: ${color3}${upspeed eth0}${color6}/${color6}${downspeed eth0}${color}
Offline
creative2innovative wrote:thanks for your positive response i tried your link but can't figure out what should i be doing. If possible can you tell me the most simple horizontal conky which display's the basic things. I don't want to get into more customization stuff.
OK, try this:
http://dl.dropbox.com/u/16070765/thmb_top1.png
Make a folder: ~/conky and put this file in there called: top1
Open a terminal and start it:conky -c ~/conky/top1 &
# killall conky && conky -c ~/conky/top1 & background no own_window yes own_window_type override # desktop dock panel override normal own_window_transparent yes own_window_colour yellow own_window_hints below,skip_taskbar,skip_pager own_window_title top own_window_class top double_buffer yes use_spacer right override_utf8_locale yes use_xft yes xftfont DejaVu Sans Mono:bold:size=8 xftalpha 1.0 update_interval 1 uppercase no stippled_borders 0 border_inner_margin 0 border_width 0 default_outline_color black default_shade_color black draw_borders no draw_graph_borders no draw_outline no draw_shades no # Colors default_color DCDCDC #Gainsboro color0 7FFF00 #Chartreuse color1 FFA07A #LightSalmon color2 FF8C00 #Darkorange color3 778899 #LightSlateGrey color4 FFD700 #Gold color5 FFDEAD #NavajoWhite color6 00BFFF #DeepSkyBlue color7 48D1CC #MediumTurquoise color8 FFFF00 #Yellow color9 FF0000 #Red text_buffer_size 1028 no_buffers yes short_units yes pad_percents 2 alignment tm gap_x 00 gap_y 5 minimum_size 675 0 maximum_width 675 TEXT ${color3}CPU: ${color7}${cpu cpu0}${goto 50}${color3}% RAM: ${color7}${memperc} ${color3}${goto 110}% Disk: ${color7}${fs_used_perc /}${goto 176}${color3}% ${color7}Temps: ${color3}CPU: ${color7}${execpi 8 sensors | grep 'Core0' | cut --characters 15-16}°${goto 290}${color3}GPU: ${color7}${execpi 8 sh -c "DISPLAY=:0.0 nvclock -T | grep GPU | cut -c21-22"}°${goto 350}${color3}SDA: ${color7}${execpi 8 hddtemp -n /dev/sda}°${goto 410}${color3}eth0: ${color7}${addr eth0} ${color3}UP${color6}/${color6}DN: ${color3}${upspeed eth0}${color6}/${color6}${downspeed eth0}${color}
I got this theme working !! Heartly thanks to you...!! Some parameters are not working else the conky is perfect..!!
Last edited by creative2innovative (2011-09-02 22:12:52)
Offline
Sector11 wrote:creative2innovative wrote:thanks for your positive response i tried your link but can't figure out what should i be doing. If possible can you tell me the most simple horizontal conky which display's the basic things. I don't want to get into more customization stuff.
OK, try this:
http://dl.dropbox.com/u/16070765/thmb_top1.png
Make a folder: ~/conky and put this file in there called: top1
Open a terminal and start it:conky -c ~/conky/top1 &
# killall conky && conky -c ~/conky/top1 & background no own_window yes own_window_type override # desktop dock panel override normal own_window_transparent yes own_window_colour yellow own_window_hints below,skip_taskbar,skip_pager own_window_title top own_window_class top double_buffer yes use_spacer right override_utf8_locale yes use_xft yes xftfont DejaVu Sans Mono:bold:size=8 xftalpha 1.0 update_interval 1 uppercase no stippled_borders 0 border_inner_margin 0 border_width 0 default_outline_color black default_shade_color black draw_borders no draw_graph_borders no draw_outline no draw_shades no # Colors default_color DCDCDC #Gainsboro color0 7FFF00 #Chartreuse color1 FFA07A #LightSalmon color2 FF8C00 #Darkorange color3 778899 #LightSlateGrey color4 FFD700 #Gold color5 FFDEAD #NavajoWhite color6 00BFFF #DeepSkyBlue color7 48D1CC #MediumTurquoise color8 FFFF00 #Yellow color9 FF0000 #Red text_buffer_size 1028 no_buffers yes short_units yes pad_percents 2 alignment tm gap_x 00 gap_y 5 minimum_size 675 0 maximum_width 675 TEXT ${color3}CPU: ${color7}${cpu cpu0}${goto 50}${color3}% RAM: ${color7}${memperc} ${color3}${goto 110}% Disk: ${color7}${fs_used_perc /}${goto 176}${color3}% ${color7}Temps: ${color3}CPU: ${color7}${execpi 8 sensors | grep 'Core0' | cut --characters 15-16}°${goto 290}${color3}GPU: ${color7}${execpi 8 sh -c "DISPLAY=:0.0 nvclock -T | grep GPU | cut -c21-22"}°${goto 350}${color3}SDA: ${color7}${execpi 8 hddtemp -n /dev/sda}°${goto 410}${color3}eth0: ${color7}${addr eth0} ${color3}UP${color6}/${color6}DN: ${color3}${upspeed eth0}${color6}/${color6}${downspeed eth0}${color}
I got this theme working !! Heartly thanks to you...!! Some parameters are not working else the conky is perfect..!!
Make a folder: ~/conky and put this file in there called: top1
Open a terminal and start it:
conky -c ~/conky/top1 &
your above lines helped me figure out how conky works ...!!! millions thanks to you..!! I successfully installed conky with rings
Offline