Conky Support, Codes and Screenshots

Sector11

lwfitz said: Im now giving a ${voffset} AHEAD warning for Sector11  :D


I haven't got a clue what you are talking about   ::)

Hey don't get me wrong ${voffset} has it's place and in some cases is unavoidable.  All I like to do is point out how it can cause conky windows to grow.  In some cases it's not so apparent, in others noticeable and annoying.

Something doesn't seem right about this though: s11_clock.lua  - - makes it look like I wrote the lua code when I didn't.  Did I use that name somewhere?  If I did my error and I apologize to mrpeachy that wrote the code.   But damn that whole setup looks N·I·C·E
Stay Home

lwfitz

You are absolutely correct about the name on s11_clock.lua, that is my mistake and I apologize to mrpeachy also.
I got it from one of your posts and I named it that so I could differentiate between it and others. Ill edit my posted config.

Oh and thank you Sector11! Glad you like it!
Don't Be A Dick!

Sector11

What can I say.  It's "modified by me" but it looks good how you have it.  ;D
Stay Home

McLovin

Mt latest Conky setup, a modified version of mr.peacheys clock, a modified version of Sector11s v9000, and some slightly modified configs from my library, still have a bit of work to do on it, will post all the codes once it's finished, but it's bed time now, so without further ado here it is

 

let me know what you think
Visit my DeviantArt page and My Blog

Sector11

WOW!  That's McAwesome
Stay Home

VastOne

Wow!  I agree with Sector11, very nicely McDone!  ;D
VSIDO      VSIDO Change Blog    

    I dev VSIDO

McLovin

I really need to change my McName lol
Visit my DeviantArt page and My Blog

Sector11

Tell us you first name is Donald and we'll McKing ya.
Oh no - not Stephen. :D
Stay Home

Sector11

#263
My version of the "HUD-week-2 combo"

This shows:

  • Ext 250GB HDD not mounted - USB - not mounted
  • Ext 250GB HDD mounted - USB - not mounted
  • Ext 250GB HDD mounted - USB mounted
  • Ext 250GB HDD not mounted - USB mounted

I won't include the VSIDO orb that can be any image you want really - it's here for the grabbing.  :D

S11_HUD3.conky
# killall conky && conky -c /media/5/Conky/S11_HUD3.conky &
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
#own_window_colour black
own_window_class Conky
own_window_title HUD 3

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type override
#own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 200

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

minimum_size 250 910 ## width, height
maximum_width 250  ## width

gap_x 10 # left-right
gap_y 10 # up-down

alignment top_left
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Monofur:bold:size=10

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades no # amplifies text if yes
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

default_color DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 778899 #119 136 153 LightSlateGray
color2 FF8C00 #255 140   0 DarkOrange
color3 7FFF00 #127 255   0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 B22222 #178  34  34 FireBrick
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 0
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################

# Boolean value, if true, Conky will be forked to background when started.
background no

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 510

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load ~/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load ~/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 15 0 0 0 0 0x000000 0.2
#
lua_load /media/5/Conky/LUA/HUD3.lua
lua_draw_hook_post main
#
#######################################################  End LUA Settings  ###
# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1


TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.3}\
${image /media/5/Conky/images/VSIDO_ORB_black.png -p 82,45 -s 75x75}\
${image /media/5/Conky/images/4.250.374_2.png -p 0,200 -s 250x374}\
${color7}CPU Fan${alignr 5}${platform f71882fg.2560 fan 1} rpm
${color6}Freq${alignr 5}${freq_g} GHz
${color7}Temp${alignr 5}${platform f71882fg.2560 temp 1}°

${color6}Mobo${alignr 5}${platform f71882fg.2560 temp 2}°

${color7}SDA ${alignr 5}${platform f71882fg.2560 temp 2}°

${color6}GPU ${alignr 5}${nvidia temp}°
${color7}Freq${alignr 5}${nvidia gpufreq} MHz${color}
${color6}Mem${alignr 5}${nvidia memfreq} MHz${color}

${goto 60}${execpi 600 /media/5/Conky/scripts/week-2.sh}\
${voffset -4}${goto 5}${font Digital tech:size=25}${color7}${time %a}${goto 190}${time %b}${color}\
${font digitalk:bold:size=13}${goto 65}${color8}${time %C}${goto 165}${time %y}${color}${font}



${goto 50}${color}MEM${goto 125}${color}SDA
${goto 120}/ &${goto 165}${color}CPU
${goto 120}/h${goto 160}${color}% ${color6}Nº${goto 197}1${goto 207}2${goto 217}3${goto 227}${color8}A${color}${font monofur:pixelsize=24}
${font}  /${goto 40}${color5}${fs_size /}${goto 100}${color9}${fs_used /}${goto 160}${color6}${fs_free /}${color}${font monofur:pixelsize=27}
${font}  /h${goto 40}${color5}${fs_size /home}${goto 100}${color9}${fs_used /home}${goto 160}${color6}${fs_free /home}${color}${font monofur:pixelsize=28}
${font}  m/5${goto 40}${color5}${fs_size /media/5}${goto 100}${color9}${fs_used /media/5}${goto 160}${color6}${fs_free /media/5}${color}${font monofur:pixelsize=28}
${font}  m/6${goto 40}${color5}${fs_size /media/6}${goto 100}${color9}${fs_used /media/6}${goto 160}${color6}${fs_free /media/6}${color}${font monofur:pixelsize=28}
${font}  m/7${goto 40}${color5}${fs_size /media/7}${goto 100}${color9}${fs_used /media/7}${goto 160}${color6}${fs_free /media/7}${color}${font monofur:pixelsize=27}
${font}  ext${goto 40}${color5}${if_mounted /media/disk}\
${fs_size /media/disk}${goto 100}${color9}${fs_used /media/disk}\
${goto 160}${color6}${fs_free /media/disk}\
${image /media/5/Conky/images/4-blue.png -p 213,494}\
${else}${goto 90}Not Mounted${endif}${color}${font monofur:pixelsize=27.5}
${font}  usb${goto 40}${color5}${if_mounted /media/VSIDO_LiveCD}\
${fs_size /media/VSIDO_LiveCD}${goto 100}${color9}${fs_used /media/VSIDO_LiveCD}\
${goto 160}${color6}25${fs_free /media/VSIDO_LiveCD}\
${image /media/5/Conky/images/4-blue.png -p 213,534}\
${else}${goto 90}Not Mounted${endif}${color}

${alignc}${kernel}

${color6}Processes ${color}${running_processes} of${processes} ${color7}${hr}${color}
Load${goto 70}${loadavg 1}${goto 140}${loadavg 2}${alignr 5}${loadavg 3}

${color6}RAM ${color}${memmax} ${color7}${hr}${color}
${alignc}Used ${memperc}% for ${mem}
Buffered ${buffers}${alignr 5}Cached ${cached}

${color6}DISK Activity ${color7}${hr}${color}
${font Monofur:bold:size=13}R${goto 40}${diskiograph_read /dev/sda 14,130 00ffff ff0000 5 -lt}${alignr 5}${diskio_read /dev/sda}
W${goto 40}${diskiograph_write /dev/sda 14,130 ff0000 00ffff 5 -lt}${alignr 5}${diskio_write /dev/sda}${font}

${color6}NETWORK ${color7}${hr}${color}
${font Monofur:bold:size=13}Dn${goto 40}${downspeedgraph eth0 14,130 00ffff ff0000 5 -lt}${alignr 5}${downspeedf eth0}
Up${goto 40}${upspeedgraph eth0 14,130 ff0000 00ffff 5 -lt}${alignr 5}${upspeedf eth0}
${font}${color0}       Down      Up         Total${font monofur:pixelsize=16}
${font}${color}${time %b %y}${goto 50}${color6}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $3 $4}'}${goto 125}${color7}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $6 $7}'}${goto 200}${color}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $9 $10}'}${font monofur:pixelsize=16}
${font}${color}${exec date | awk '{print $3" "$2}'}${goto 50}${color6}${execi 300 vnstat | grep "today" | awk '{print $2 $3}'}${goto 125}${color7}${execi 300 vnstat | grep "today" | awk '{print $5 $6}'}${goto 200}${color}${execi 300 vnstat | grep "today" | awk '{print $8 $9}'}
${exec date --date="-1 day" | awk '{print $3" "$2}'}${goto 50}${color6}${execi 300 vnstat | grep "yesterday" | awk '{print $2 $3}'}${goto 125}${color7}${execi 300 vnstat | grep "yesterday" | awk '{print $5 $6}'}${goto 200}${color}${execi 300 vnstat | grep "yesterday" | awk '{print $8 $9}'}
${color}Last 7${goto 50}${color6}${execi 300 vnstat -w | grep "last 7 days" | awk '{print $4 $5}'}${goto 125}${color7}${execi 300 vnstat -w | grep "last 7 days" | awk '{print $7 $8}'}${goto 200}${color}${execi 300 vnstat -w | grep "last 7 days" | awk '{print $10 $11}'}


HUD3.lua
--==============================================================================
--  Origianl by: SLK
--  license : Distributed under the terms of GNU GPL version 2 or later
--  modified by Sector11 - Feb 2013
--==============================================================================

require 'cairo'

--------------------------------------------------------------------------------
--                                                                    gauge DATA
gauge = {
{
    name='cpu',                    arg='cpu0',                  max_value=100,
    x=170,                         y=270, --180,150
    graph_radius=60,
    graph_thickness=5,
    graph_start_angle=0,
    graph_unit_angle=0.9,          graph_unit_thickness=0.9,
    graph_bg_colour=0xFFFF00,      graph_bg_alpha=0.3,
    graph_fg_colour=0xFFFF00,      graph_fg_alpha=0.0,
    hand_fg_colour=0xFFFF00,       hand_fg_alpha=1.0,
    txt_radius=60, -- yellow
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0xFFFF00,        txt_fg_alpha=0.8,
    graduation_radius=30,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFF00, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='cpu',                    arg='cpu1',                  max_value=100,
    x=170,                         y=270, --180,150
    graph_radius=50,
    graph_thickness=5,
    graph_start_angle=0,
    graph_unit_angle=0.9,          graph_unit_thickness=0.9,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.0,
    hand_fg_colour=0x00BFFF,       hand_fg_alpha=1.0,
    txt_radius=50, -- green
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0x00BFFF,        txt_fg_alpha=0.8,
    graduation_radius=55,
    graduation_thickness=5,        graduation_mark_thickness=2,
    graduation_unit_angle=27,
    graduation_fg_colour=0x00BFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='cpu',                    arg='cpu2',                  max_value=100,
    x=170,                         y=270, --180,150
    graph_radius=40,
    graph_thickness=5,
    graph_start_angle=0,
    graph_unit_angle=0.9,          graph_unit_thickness=0.9,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.0,
    hand_fg_colour=0x00BFFF,       hand_fg_alpha=1.0,
    txt_radius=40,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0x00BFFF,        txt_fg_alpha=0.8,
    graduation_radius=30,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0x00BFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='cpu',                    arg='cpu3',                  max_value=100,
    x=170,                         y=270, --180,150
    graph_radius=30,
    graph_thickness=5,
    graph_start_angle=0,
    graph_unit_angle=0.9,          graph_unit_thickness=0.9,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.0,
    hand_fg_colour=0x00BFFF,       hand_fg_alpha=1.0,
    txt_radius=30,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0x00BFFF,        txt_fg_alpha=0.8,
    graduation_radius=35,
    graduation_thickness=5,        graduation_mark_thickness=2,
    graduation_unit_angle=27,
    graduation_fg_colour=0x00BFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='memperc',                arg='',                      max_value=100,
    x=60,                          y=245, --40,115
    graph_radius=34,
    graph_thickness=5,
    graph_start_angle=180,
    graph_unit_angle=2,            graph_unit_thickness=2,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.0,
    hand_fg_colour=0x00BFFF,       hand_fg_alpha=1.0,
    txt_radius=20,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0x00BFFF,        txt_fg_alpha=0.8,
    graduation_radius=24,
    graduation_thickness=6,        graduation_mark_thickness=2,
    graduation_unit_angle=10,
    graduation_fg_colour=0x00BFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=10.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='fs_used_perc',           arg='/',                     max_value=100,
    x=130,                         y=250, --120,70
    graph_radius=25, --40,
    graph_thickness=4,
    graph_start_angle=210,
    graph_unit_angle=2,            graph_unit_thickness=2,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.0,
    hand_fg_colour=0x00BFFF,       hand_fg_alpha=1.0,
    txt_radius=17, --32,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1.0,
    graduation_radius=31, --46,
    graduation_thickness=0,        graduation_mark_thickness=2,
    graduation_unit_angle=20,
    graduation_fg_colour=0x00BFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='fs_used_perc',           arg='/home/',                max_value=100,
    x=130,                         y=250, --120,70
    graph_radius=35, --50,
    graph_thickness=8,
    graph_start_angle=210,
    graph_unit_angle=2,            graph_unit_thickness=2,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.0,
    hand_fg_colour=0x00BFFF,       hand_fg_alpha=1.0,
    txt_radius=50, --65,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1.0,
    graduation_radius=43, --58,
    graduation_thickness=4,        graduation_mark_thickness=2,
    graduation_unit_angle=20,
    graduation_fg_colour=0x00BFFF, graduation_fg_alpha=0.6,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
}
-------------------------------------------------------------------------------
--                                                                 rgb_to_r_g_b
-- converts color in hexa to decimal
--
function rgb_to_r_g_b(colour, alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

-------------------------------------------------------------------------------
--                                                            angle_to_position
-- convert degree to rad and rotate (0 degree is top/north)
--
function angle_to_position(start_angle, current_angle)
    local pos = current_angle + start_angle
    return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
end

-------------------------------------------------------------------------------
--                                                              draw_gauge_ring
-- displays gauges
--
function draw_gauge_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_start_angle = data['graph_start_angle']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']
    local hand_fg_colour, hand_fg_alpha = data['hand_fg_colour'], data['hand_fg_alpha']
    local graph_end_angle = (max_value * graph_unit_angle) % 360

    -- background ring
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, 0), angle_to_position(graph_start_angle, graph_end_angle))
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = (value or 0) % (max_value +1)
    local start_arc = 0
    local stop_arc = 0
    local i = 1
    while i <= val do
        start_arc = (graph_unit_angle * i) - graph_unit_thickness
        stop_arc = (graph_unit_angle * i)
        cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
        cairo_set_source_rgba(display, rgb_to_r_g_b(graph_fg_colour, graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = start_arc

    -- hand
    start_arc = (graph_unit_angle * val) - (graph_unit_thickness * 2)
    stop_arc = (graph_unit_angle * val)
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
    cairo_set_source_rgba(display, rgb_to_r_g_b(hand_fg_colour, hand_fg_alpha))
    cairo_stroke(display)

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = graph_end_angle / graduation_unit_angle
        local i = 0
        while i < nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            start_arc = (graduation_unit_angle * i) - (graduation_mark_thickness / 2)
            stop_arc = (graduation_unit_angle * i) + (graduation_mark_thickness / 2)
            cairo_arc(display, x, y, graduation_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * math.cos(angle_to_position(graph_start_angle, angle))
    local movey = txt_radius * math.sin(angle_to_position(graph_start_angle, angle))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight)
    cairo_set_font_size (display, txt_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha))
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3)
    cairo_show_text (display, value)
    cairo_stroke (display)

    -- caption
    local caption = data['caption']
    local caption_weight, caption_size = data['caption_weight'], data['caption_size']
    local caption_fg_colour, caption_fg_alpha = data['caption_fg_colour'], data['caption_fg_alpha']
    local tox = graph_radius * (math.cos((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    local toy = graph_radius * (math.sin((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, caption_weight);
    cairo_set_font_size (display, caption_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(caption_fg_colour, caption_fg_alpha))
    cairo_move_to (display, x + tox + 5, y + toy + 1)
    -- bad hack but not enough time !
    if graph_start_angle < 105 then
        cairo_move_to (display, x + tox - 30, y + toy + 1)
    end
    cairo_show_text (display, caption)
    cairo_stroke (display)
end

-------------------------------------------------------------------------------
--                                                               go_gauge_rings
-- loads data and displays gauges
--
function go_gauge_rings(display)
    local function load_gauge_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_gauge_ring(display, data, value)
    end

    for i in pairs(gauge) do
        load_gauge_rings(display, gauge[i])
    end
end


--------------------------------------------------------------------------------
--                                                                    clock DATA
-- HOURS
clock_h = {
    {
    name='time',                   arg='%H',                    max_value=12,
    x=120,                          y=85,
    graph_radius=62, --58, --53,
    graph_thickness=3,
    graph_unit_angle=30,           graph_unit_thickness=30,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.0,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.3,
    txt_radius=70, --39, --34,
    txt_weight=1,                  txt_size=15.0,
    txt_fg_colour=0xFFDEAD,        txt_fg_alpha=1.0,
    graduation_radius=58, --53,
    graduation_thickness=6,        graduation_mark_thickness=2,
    graduation_unit_angle=30,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    },
}
-- MINUTES
clock_m = {
    {
    name='time',                   arg='%M',                    max_value=60,
    x=120,                          y=85,
    graph_radius=58, --62, --57,
    graph_thickness=2,
    graph_unit_angle=6,            graph_unit_thickness=6,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.2,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.7,
    txt_radius=47, --39, --70, --65,
    txt_weight=1,                  txt_size=15.0,
    txt_fg_colour=0xFFDEAD,        txt_fg_alpha=1.0,
    graduation_radius=62, --57,
    graduation_thickness=0,        graduation_mark_thickness=2,
    graduation_unit_angle=30,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    },
}
-- SECONDS
clock_s = {
    {
    name='time',                   arg='%S',                    max_value=60,
    x=120,                          y=85,
    graph_radius=55, --50,
    graph_thickness=2,
    graph_unit_angle=6,            graph_unit_thickness=2,
    graph_bg_colour=0xFFDEAD,      graph_bg_alpha=0.0,
    graph_fg_colour=0xFFDEAD,      graph_fg_alpha=0.7,
    txt_radius=47, --42,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFFDEAD,        txt_fg_alpha=1.0,
    graduation_radius=0,
    graduation_thickness=0,        graduation_mark_thickness=0,
    graduation_unit_angle=0,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.0,
    },
}

--------------------------------------------------------------------------------
--                                                                 rgb_to_r_g_b
-- converts color in hexa to decimal
--
function rgb_to_r_g_b(colour, alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

-------------------------------------------------------------------------------
--                                                            angle_to_position
-- convert degree to rad and rotate (0 degree is top/north)
--
function angle_to_position(start_angle, current_angle)
    local pos = current_angle + start_angle
    return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
end

-------------------------------------------------------------------------------
--                                                              draw_clock_ring
-- displays clock
--
function draw_clock_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']

    -- background ring
    cairo_arc(display, x, y, graph_radius, 0, 2 * math.pi)
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = (value % max_value)
    local i = 1
    while i <= val do
        cairo_arc(display, x, y, graph_radius,(  ((graph_unit_angle * i) - graph_unit_thickness)*(2*math.pi/360)  )-(math.pi/2),((graph_unit_angle * i) * (2*math.pi/360))-(math.pi/2))
        cairo_set_source_rgba(display,rgb_to_r_g_b(graph_fg_colour,graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = (graph_unit_angle * i) - graph_unit_thickness

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = 360 / graduation_unit_angle
        local i = 1
        while i <= nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            cairo_arc(display, x, y, graduation_radius, (((graduation_unit_angle * i)-(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2),(((graduation_unit_angle * i)+(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * (math.cos((angle * 2 * math.pi / 360)-(math.pi/2)))
    local movey = txt_radius * (math.sin((angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight);
    cairo_set_font_size (display, txt_size);
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha));
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3);
    cairo_show_text (display, value);
    cairo_stroke (display);
end

-------------------------------------------------------------------------------
--                                                               go_clock_rings
-- loads data and displays clock
--
function go_clock_rings(display)
    local function load_clock_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_clock_ring(display, data, value)
    end

    for i in pairs(clock_h) do
        load_clock_rings(display, clock_h[i])
    end
    for i in pairs(clock_m) do
        load_clock_rings(display, clock_m[i])
    end
    for i in pairs(clock_s) do
        load_clock_rings(display, clock_s[i])
    end
end


-------------------------------------------------------------------------------
--                                                                         MAIN
function conky_main()
    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 display = cairo_create(cs)

    local updates = conky_parse('${updates}')
    update_num = tonumber(updates)

    if update_num > 5 then
        go_gauge_rings(display)
        go_clock_rings(display)
    end

    cairo_surface_destroy(cs)
    cairo_destroy(display)
end



week-2.sh
#!/bin/bash
# By: mobilediesel

font=("\${voffset -10}\${font digitalk:size=4}" "\${voffset -0}\${font digitalk:size=8}" "\${voffset -0}\${font digitalk:size=12}" "\${voffset -3}\${font digitalk:size=30}\${color 00FFFF}" "\${voffset -15}\${font digitalk:size=12}" "\${voffset -4}\${font digitalk:size=7}" "\${voffset -2}\${font digitalk:size=4}")
color=("" "" "" "\${color}" "" "" "")

for i in $(seq -3 3); do
echo -n "${font[$[i+3]]}$(date '+%d' -d "$i days")${color[3]}\${offset 3}"
done


And because I am using it and it has a calendar by mrpeachy: draw-bg.lua
--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

  the change is that if you set width and/or height to 0
  then it assumes the width and/or height of the conky window

so:

Above and After TEXT  (requires a composite manager or it blinks!)

lua_load ~/wea_conky/draw_bg.lua
TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}

OR Both above TEXT (no composite manager required - no blinking!)

lua_load ~/wea_conky/draw_bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
TEXT

Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
  See below:        1  2 3 4 5 6        7

${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

covers the whole window and will change if you change the minimum_size setting

1 = 20             corner_radius
2 = 0             x_position
3 = 0             y_position
3 = 0             width
5 = 0             height
6 = 0x000000      color
7 = 0.4           alpha

######### calendar function ##################################################

then to use it, you activate the calendar function BELOW TEXT like this

${lua luacal {settings}}

#${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
#    x=x position top left
#    y=y position top left
#    tf=title font, eg "mono" must be in quotes
#    tfs=title font size
#    tc=title color
#    ta=title alpha
#    bf=body font, eg "mono" must be in quotes
#    bfs=body font size
#    bc=body color
#    ba=body alpha
#    hf=highlight font, eg "mono" must be in quotes
#    hfs=highlight font size
#    hc=highlight color
#    ha=highlight alpha
#    sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts

#    gt=gap from title to body
#    gh=gap horizontal between columns
#    gv=gap vertical between rows
#    sd=start day, 0=Sun, 1=Mon

#    hstyle = heading style, 0=just days, 1=date insert
#    tdf=title date font, eg "mono" must be in quotes
#    tdfs=title date font size
#    tdc=title date color
#    tda=title date alpha

# test line
-- ${lua luacal {x=10,y=100,tf="Purisa",tfs=24,tc=0xf67e16,ta=1,bf="First Order",bfs=26,bc=0xecd32a,ba=1,hf="Purisa",hfs=18,hc=0xf67e16,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="First Order",tdfs=28,tdc=0xff0000,tda=1}}


]]

require 'cairo'
local    cs, cr = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) 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)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end
-- ###### calendar function ##################################################
function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
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)
--############################################################################
if caltab.x==nil then
caltab=loadstring("return" .. caltab)()
end
local cal_x=caltab.x
local cal_y=caltab.y
local tfont=caltab.tf or "mono"
local tfontsize=caltab.tfs or 12
local tc=caltab.tc or 0xffffff
local ta=caltab.ta or 1
local bfont=caltab.bf or "mono"
local bfontsize=caltab.bfs or 12
local bc=caltab.bc or 0xffffff
local ba=caltab.ba or 1
local hfont=caltab.hf or "mono"
local hfontsize=caltab.hfs or 12
local hc=caltab.hc or 0xff0000
local ha=caltab.ha or 1
local spacer=caltab.sp or " "
local gaph=caltab.gh or 20
local gapt=caltab.gt or 15
local gapl=caltab.gv or 15
local sday=caltab.sd or 0
local hstyle=caltab.hstyle or 0
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
--############################################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
    if i<=start_day then
    dnum[i]="  "
    else
    dn=i-start_day
        if dn=="nil" then dn=0 end
        if dn<=9 then dn=(spacer .. dn) end
        if i>x then dn="" end
        dnum[i]=dn
        dnumh[i]=dn
        if dn==(spacer .. today) or dn==today then
        dnum[i]=""
        end
        if dn==(spacer .. today) or dn==today then
        dnumh[i]=dn
        place=i
        else dnumh[i]="  "
        end
    end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
if hstyle==0 then
    if tonumber(sday)==0 then
    dys={"SU","MO","TU","WE","TH","FR","SA"}
    else
    dys={"MO","TU","WE","TH","FR","SA","SU"}
    end
    --draw calendar titles
elseif hstyle==1 then
    if tonumber(sday)==0 then
    dys={"SU","MO"," ","  ","  ","FR","SA"}
    cairo_text_extents(cr,"MO",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    else
    dys={"MO","TU"," ","  ","  ","SA","SU"}
    cairo_text_extents(cr,"TU",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    end
end
--draw calendar titles
for i=1,7 do
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnum[i])
    cairo_stroke (cr)
    end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnumh[i])
    cairo_stroke (cr)
    end
end
--############################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end
-- end main function #########################################################


The stack of harddrives:
And links to the blue and red  lights.  I include the red although I don't use it.

Well, OK, since you insist - falldown's VSIDO_ORB_black.png
Stay Home

McLovin

@Sector11
I'm so stealing that HDD setup, and I'm gonna use it for my system and my servers, you do such good work for me, thank you, but no, you're not gonna get paid for it, I'm poor.
Visit my DeviantArt page and My Blog

lwfitz

#265
@ McLovin

Holy crap thats awesome! Freakin love that wallpaper!


@ Sector11

Im stealing doing research with that hdd setup right now!

Don't Be A Dick!

Sector11

#266
@ McLovin

- Your words put a smile on my face - trust me, that is McPayment enough.
Besides, I doubt you are a poor as I am.  :D

@ lwfitz

Yea everyone coming up with these awesome widescreen walls that I can't use.  :(

But they do look supercalifragilisticexpialidocious - and some of yours are in that group as well, so take a bow.

Also there is a huge difference between stealing and C4'ing a conky.

It does me good to know my conkys - or even parts of - have been C4'd.   8)

Historical reference to CCCC from a text file I have here...
Quotevrkalak wrote:

    ^ paolo . . . very nice.

    When it comes to designing your own Conky (or the OS for that matter) . . . you build what works for you.

    What matters is that 'you' like it and it does what 'you' want it to do or look like.

    And with GNU/Linux and Open Source . . . there is no such thing as 'stealing' tongue

    Hopefully, everything we do with the program/application only makes it better and easier for someone else to configure and add to.

    lol  just don't play with your Conky, too much ... it'll make you go blind

=====
Agree 100% I saw it said once that it was CCCC - not sure what it means but it was something like (if not) Co-operative Collective Conky Community  - I just call it "Cloned"

EDIT: I went looking, the quote comes from londonali1010:

londonali1010 wrote:
    The Collaborative Creative Conky Community

=====
arpinux wrote:
    The Collaborative Creative Conky Community
    la Communauté Coopérante Créatrice de Conky  <<<<<<--- CCCC works in french too  ;D

=====
proxess wrote:
    A Comunidade Criativa Colaborativa de Conky
    Works in Portuguese too!

=====
And I do believe Spanish as well: La Colaboración de la Comunidad Creativa de Conky

Commonly referred to as: Your conky has been C4'd

And I'd like to add that conky is like disto-hopping, once you've got the bug there is no stopping without the aid of a "1100 Step Program"

Can I play with my conky until I needed glasse?

=====
paolo wrote:
and also in italian is CCCC !
La Comunità Cooperativa Creatrice di Conky
Stay Home

Sector11

#267
@ anyone with a server
Or anyone else understanding ports better than I

When downloading something; wouldn't that be "Incoming Traffic"
When watching a movie online; wouldn't that be "Incoming Traffic"


I was watching a movie online and downloading a file, I saw nothing in "Incoming"




Variable         Arguments () = optional

tcp_portmon      port_begin port_end item (index)



Explanation:

TCP port (both IPv6 and IPv4) monitor for specified local ports. Port numbers must be in the range 1 to 65535. Valid items are:

    count - Total number of connections in the range
    rip - Remote ip address
    rhost - Remote host name
    rport - Remote port number
    rservice - Remote service name from /etc/services
    lip - Local ip address
    lhost - Local host name
    lport - Local port number
    lservice - Local service name from /etc/services

The connection index provides you with access to each connection in the port monitor. The monitor will return information for index values from 0 to n-1 connections. Values higher than n-1 are simply ignored. For the "count" item, the connection index must be omitted. It is required for all other items.

Examples:

    ${tcp_portmon 6881 6999 count} - Displays the number of connections in the bittorrent port range
    ${tcp_portmon 22 22 rip 0} - Displays the remote host ip of the first sshd connection
    ${tcp_portmon 22 22 rip 9} - Displays the remote host ip of the tenth sshd connection
    ${tcp_portmon 1 1024 rhost 0} - Displays the remote host name of the first connection on a privileged port
    ${tcp_portmon 1 1024 rport 4} - Displays the remote host port of the fifth connection on a privileged port
    ${tcp_portmon 1 65535 lservice 14} - Displays the local service name of the fifteenth connection in the range of all ports

Note that port monitor variables which share the same port range actually refer to the same monitor, so many references to a single port range for different items and different indexes all use the same monitor internally. In other words, the program avoids creating redundant monitors.




S11_Connections.conky
# To use #! in a conky use: ${exec echo '#!'}
# conky -c /media/5/Conky/S11_Connections.conky &
# Original by: Habitual

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

own_window_type normal
own_window_transparent yes
own_window_hints skip_taskbar,skip_pager
own_window_class Conky
own_window_title Connections

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type override
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 150

minimum_size 600 190 # width, height
maximum_width 600 # width

gap_x 0 ### left &right
gap_y 50 ### up & down

alignment tm
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont monofur:bold:size=10

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

## see: Color Settings for colours ##
draw_shades yes #### <-- To see it easier on light screens.
draw_outline no #### <-- Amplifies text if yes


uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color 000000
default_outline_color 000000

#default_color 000000 #  0   0   0 Black
default_color DCDCDC #220 220 220 Gainsboro
color0 FFE595 #Teo Gold
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan #48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red  #A52A2A #DarkRed
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 10
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################

# Boolean value, if true, Conky will be forked to background when started.
background no

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

## default bar size
default_bar_size 200 20

## Width for $top name value (defaults to 15 characters).
top_name_width 8

## Specify a default width and height for graphs.
## Example: 'default_graph_size 0 25'. This is particularly useful for execgraph
## and execigraph as they do not take size arguments
## default_graph_size 220 100

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/dra2w-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 0 0 0 0 0 0x000000 0.5
### mount.lua ##################################################################
#
##instructions
##load script
##lua_load ~/path_to/mounted.lua
#lua_load /media/5/Conky/LUA/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type}, where partition number is a number
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint
#######################################################  End LUA Settings  ###

#digiThe all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1 # in seconds

# stuff after 'TEXT' will be formatted on screen

TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.5}\
${color5}IP (${color}${addr eth0}${color5})${image /media/5/Conky/images/deep_skyblue_1.png -p 14,56 -s 55x1}\
${goto 150}${color5}Down: ${color}${downspeedf eth0}${image /media/5/Conky/images/deep_skyblue_1.png -p 310,56 -s 60x1}\
${goto 240}${color5}Inbound: ${color}${tcp_portmon 1 32767 count}${image /media/5/Conky/images/deep_skyblue_1.png -p 415,56 -s 34x1}\
${goto 330}| ${color5}Up: ${color}${upspeedf eth0}${image /media/5/Conky/images/deep_skyblue_1.png -p 470,56 -s 34x1}\
${goto 430}${color5}Outbound: ${color}${tcp_portmon 32768 65535 count}${image /media/5/Conky/images/deep_skyblue_1.png -p 525,56 -s 39x1}\
${goto 530}${color5}Total: ${color}${tcp_portmon 1 65535 count}${color}
${color6}${hr}${color}
${color5}${goto 480}Local${goto 535}Remote
  Hostname${goto 320}Remote IP ${goto 425}Proto${goto 480}Port${goto 535}Port${color}

${color5}1 ${color}${tcp_portmon 1 65535 rhost 0}${goto 320}${tcp_portmon 1 65535 rip 0}${goto 428}${tcp_portmon 1 65535 rservice 0}${goto 478}${tcp_portmon 1 65535 lport 0}${goto 535}${tcp_portmon 1 65535 rport 0}
${color5}2 ${color}${tcp_portmon 1 65535 rhost 1}${goto 320}${tcp_portmon 1 65535 rip 1}${goto 428}${tcp_portmon 1 65535 rservice 1}${goto 478}${tcp_portmon 1 65535 lport 1}${goto 535}${tcp_portmon 1 65535 rport 1}
${color5}3 ${color}${tcp_portmon 1 65535 rhost 2}${goto 320}${tcp_portmon 1 65535 rip 2}${goto 428}${tcp_portmon 1 65535 rservice 2}${goto 478}${tcp_portmon 1 65535 lport 2}${goto 535}${tcp_portmon 1 65535 rport 2}
${color5}4 ${color}${tcp_portmon 1 65535 rhost 3}${goto 320}${tcp_portmon 1 65535 rip 3}${goto 428}${tcp_portmon 1 65535 rservice 3}${goto 478}${tcp_portmon 1 65535 lport 3}${goto 535}${tcp_portmon 1 65535 rport 3}
${color5}5 ${color}${tcp_portmon 1 65535 rhost 4}${goto 320}${tcp_portmon 1 65535 rip 4}${goto 428}${tcp_portmon 1 65535 rservice 4}${goto 478}${tcp_portmon 1 65535 lport 4}${goto 535}${tcp_portmon 1 65535 rport 4}
${color5}6 ${color}${tcp_portmon 1 65535 rhost 5}${goto 320}${tcp_portmon 1 65535 rip 5}${goto 428}${tcp_portmon 1 65535 rservice 5}${goto 478}${tcp_portmon 1 65535 lport 5}${goto 535}${tcp_portmon 1 65535 rport 5}
${color5}7 ${color}${tcp_portmon 1 65535 rhost 6}${goto 320}${tcp_portmon 1 65535 rip 6}${goto 428}${tcp_portmon 1 65535 rservice 6}${goto 478}${tcp_portmon 1 65535 lport 6}${goto 535}${tcp_portmon 1 65535 rport 6}
${color5}8 ${color}${tcp_portmon 1 65535 rhost 7}${goto 320}${tcp_portmon 1 65535 rip 7}${goto 428}${tcp_portmon 1 65535 rservice 7}${goto 478}${tcp_portmon 1 65535 lport 7}${goto 535}${tcp_portmon 1 65535 rport 7}
${color5}9 ${color}${tcp_portmon 1 65535 rhost 8}${goto 320}${tcp_portmon 1 65535 rip 8}${goto 428}${tcp_portmon 1 65535 rservice 8}${goto 478}${tcp_portmon 1 65535 lport 8}${goto 535}${tcp_portmon 1 65535 rport 8}
${color5}0 ${color}${tcp_portmon 1 65535 rhost 9}${goto 320}${tcp_portmon 1 65535 rip 9}${goto 428}${tcp_portmon 1 65535 rservice 9}${goto 478}${tcp_portmon 1 65535 lport 9}${goto 535}${tcp_portmon 1 65535 rport 9}

${color6}Port(s)${alignr}Connections${color}
Inbound: ${tcp_portmon 1 32767 count}  Outbound: ${tcp_portmon 32768 61000 count}${alignr}ALL: ${tcp_portmon 1 65535 count}

${color6}Inbound Connection ${alignr} Local Service/Port$color

${color5}1 ${color}${tcp_portmon 1 32767 lhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0}
${color5}2 ${color}${tcp_portmon 1 32767 lhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}
${color5}3 ${color}${tcp_portmon 1 32767 lhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}
${color5}4 ${color}${tcp_portmon 1 32767 lhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3}
${color5}5 ${color}${tcp_portmon 1 32767 lhost 4} ${alignr} ${tcp_portmon 1 32767 lservice 4}
${color5}6 ${color}${tcp_portmon 1 32767 lhost 5} ${alignr} ${tcp_portmon 1 32767 lservice 5}
${color5}7 ${color}${tcp_portmon 1 32767 lhost 6} ${alignr} ${tcp_portmon 1 32767 lservice 6}
${color5}8 ${color}${tcp_portmon 1 32767 lhost 7} ${alignr} ${tcp_portmon 1 32767 lservice 7}
${color5}9 ${color}${tcp_portmon 1 32767 lhost 8} ${alignr} ${tcp_portmon 1 32767 lservice 8}
${color5}0 ${color}${tcp_portmon 1 32767 lhost 9} ${alignr} ${tcp_portmon 1 32767 lservice 9}

${color6}Outbound Connection ${alignr} Remote Service/Port$color
${color5}1 ${color}${tcp_portmon 32768 61000 lhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0}
${color5}2 ${color}${tcp_portmon 32768 61000 lhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1}
${color5}3 ${color}${tcp_portmon 32768 61000 lhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2}
${color5}4 ${color}${tcp_portmon 32768 61000 lhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3}
${color5}5 ${color}${tcp_portmon 32768 61000 lhost 4} ${alignr} ${tcp_portmon 32768 61000 rservice 4}
${color5}6 ${color}${tcp_portmon 32768 61000 lhost 5} ${alignr} ${tcp_portmon 32768 61000 rservice 5}
${color5}7 ${color}${tcp_portmon 32768 61000 lhost 6} ${alignr} ${tcp_portmon 32768 61000 rservice 6}
${color5}8 ${color}${tcp_portmon 32768 61000 lhost 7} ${alignr} ${tcp_portmon 32768 61000 rservice 7}
${color5}9 ${color}${tcp_portmon 32768 61000 lhost 8} ${alignr} ${tcp_portmon 32768 61000 rservice 8}
${color5}0 ${color}${tcp_portmon 32768 61000 lhost 9} ${alignr} ${tcp_portmon 32768 61000 rservice 9}


NOTE:  I cannot remember where I got the incoming - outgoing port numbers from:
  • Incoming: tcp_portmon 1 32767
  • Outgoing: tcp_portmon 32768 61000
    but they don't seem to be working.

    Any help would be gratefully accepted.   8)
Stay Home

VastOne

I am curious about this setting, as to why it is needed.  Does it just break down by port what is downloading?

I use the upspeedgraph and downspeedgraph ... I am aware that I could also add in the speed in numbers, but for me the graphs are very clear and always consistent.  By that I mean, if it is a full blown upload and/or download, the graphs show what is happening pretty clearly
VSIDO      VSIDO Change Blog    

    I dev VSIDO

Sector11

However many years back that I picked up the tip that ports 1 to 32767 inbound  and ports 32768 to 61000 were outbound I have played with this conky, adding to it, changing it and never really understanding what it did other than it was showing actual connections on the net.  Running this conky and opening a new web page really opened my eyes ... for a short while each page has multiple connections, and once the "bots" (I'm guessing here) get what they want, the links drop off.

I have no idea what ports "62001 to 65535" represent.

I'm trying to figure out if it can be separated between downloading (inbound) and uploading (outbound) as I was lead to believe and what are those ports on the end are for?  ( 62001 to 65535 )

Or is it like the command says: 'remote' and 'local' and that's it?

I'm working on a version at the moment that has 25 "remote" and "local" connections showing, and at times it's not enough.  So I'm just curious to know what's what is all.  This is definitely not one of your average run of the mill conkys but a specialized one monitoring the computers ports.

Most conkys have net stuff usually have the graph as you have (I do as well) or a combo of:
upspeed, upspeedf, upspeedgraph
downspeed downspeedf downspeedgraph
totaldown or totalup - not good for 32 bit.

Some interesting reading.
  1.  List of TCP and UDP port numbers
  2.  Service Name and Transport Protocol Port Number Registry WARNING: Huge
  3. TCP and UDP Ports Explained - conky doesn't do "udp ports" - Interesting read.
  4. there are more  :)

So basically this is a fact finding mission.

The latest version just
after opening new tab here


And the graphs - they don't
say "where" the info is
going to or coming from

just that it's busy
out there
Stay Home