SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#6426 2013-10-22 17:16:36

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

There is LFS, "LUA File System", but it's not binded to Conky.
So need to use function that reads output of CLI programs, like "stat -c '%y' filename"


Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop

Offline

Be excellent to each other!

#6427 2013-10-23 02:01:41

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,727

Re: Conky v1.9 Thread

Work in progress...
2013_10_22_1382493369_1440x900_scrot.jpg

Inspired by easysid's awesome gear clock.

more to come...  big_smile

Offline

#6428 2013-10-23 02:49:04

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

falldown wrote:

Work in progress...
http://s23.postimg.org/5v68mdivr/2013_10_22_1382493369_1440x900_scrot.jpg

Inspired by easysid's awesome gear clock.

more to come...  big_smile

That proves it, I'm a conky dinosaur.  That is just so awesome!


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6429 2013-10-23 04:07:08

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,727

Re: Conky v1.9 Thread

^ you are not a dinosaur.
I have a lot more to add to this one.  big_smile

Offline

#6430 2013-10-23 04:11:01

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

falldown wrote:

^ you are not a dinosaur.
I have a lot more to add to this one.  big_smile

I couldn't get to where you are let alone add more.  big_smile


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6431 2013-10-23 06:31:44

easysid
#! CrunchBanger
From: India
Registered: 2013-01-25
Posts: 150

Re: Conky v1.9 Thread

falldown wrote:

Work in progress...
http://s23.postimg.org/5v68mdivr/2013_10_22_1382493369_1440x900_scrot.jpg

Inspired by easysid's awesome gear clock.

more to come...  big_smile

Now that is what I meant when I said better artwork. That is beautiful. smile
If the orbs are a bit transparent, it would look awesome with the gears inside. That clock face should be the default, not my ugly hack.

Also, I  updated my lua script .

Last edited by easysid (2013-10-23 06:36:43)

Offline

#6432 2013-10-24 14:42:13

Habitual
#! Member
From: Youngstown, OH
Registered: 2010-09-10
Posts: 62
Website

Re: Conky v1.9 Thread

Sector11 wrote:

That proves it, I'm a conky dinosaur.  That is just so awesome!

It is awesome, and #OldGuysRule


Success is 1% Inspiration
and 98% Perspiration and
2% atttention to details.

Offline

#6433 2013-10-24 16:14:00

easysid
#! CrunchBanger
From: India
Registered: 2013-01-25
Posts: 150

Re: Conky v1.9 Thread

^ says someone from Youngstown !! big_smile big_smile

Offline

#6434 2013-10-24 18:28:34

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

easysid wrote:

^ says someone from Youngstown !! big_smile big_smile

GOOD catch --- what's the rule for Youngstown?  No one over 30 allowed!  lol  lol

Forever young - I gotta move.

BTW, your new script with my version of the clock running iceweasel and claws-mail: 4-5% CPU usage  - that's very acceptable.
2013_10_24_15_20_34_1920x1080_Sector11.jpg

Not as nice looking as falldown's piece of art but I like it!
{still working on a big conky project}


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6435 2013-10-24 18:32:33

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Habitual wrote:
Sector11 wrote:

That proves it, I'm a conky dinosaur.  That is just so awesome!

It is awesome, and #OldGuysRule

Yup, we rule ... once we wake up, if we manage to get outta bed   lol  lol  lol


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6436 2013-10-24 18:38:35

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 595

Re: Conky v1.9 Thread

hello to all you conky lovers!

I have got a little problem: Right now i am using this setup including a clockring-lua which also watches whether mocp is running or not and starts a new moc-conky if it does.

achsSGRn.jpg

but what i would really love to add is the posibility to click the conky to open the stats like this (please ignor the realy bad animation):

adolxDQW.jpg

i allready tried to get the tutorial i need from the interactiv conky thread but it seems to be a little over my head. so, if someone would like to give me one or the other hint on how to get this to work, it would be highly appreciated

here is the lua file i am using so far:

--==============================================================================
--                                 conky-moc-clock.lua
--
--  authors  : SLK, londonali1010, arclance, NAIK
--  version : v2011070223
--  license : Distributed under the terms of GNU GPL version 2 or later
--
--==============================================================================

require 'cairo'

if tonumber(conky_parse('${updates}')) < 2 then --# don't reset these global variables when changes are made to the lua script
    mocRunning = 0
elseif mocRunning == nil then --# recreate variable if .conkyrc is edited (will break functionality if you do it while program is running though)
    mocRunning = 0
end --# if tonumber(conky_parse('${updates}')) < 2 then

--------------------------------------------------------------------------------
--                                                                    clock DATA
-- HOURS
clock_h = {
    {
    name='time',                   arg='%H',                    max_value=12,
    x=100,                         y=100,
    graph_radius=53,
    graph_thickness=3,
    graph_unit_angle=30,           graph_unit_thickness=30,
    graph_bg_colour=0xCAD3DC,      graph_bg_alpha=0.0,
    graph_fg_colour=0xCAD3DC,      graph_fg_alpha=0.3,
    txt_radius=42,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0xCAD3DC,        txt_fg_alpha=0.6,
    graduation_radius=53,
    graduation_thickness=6,        graduation_mark_thickness=2,
    graduation_unit_angle=30,
    graduation_fg_colour=0xCAD3DC, graduation_fg_alpha=0.3,
    },
}
-- MINUTES
clock_m = {
    {
    name='time',                   arg='%M',                    max_value=60,
    x=100,                         y=100,
    graph_radius=57,
    graph_thickness=2,
    graph_unit_angle=6,            graph_unit_thickness=6,
    graph_bg_colour=0xCAD3DC,      graph_bg_alpha=0.1,
    graph_fg_colour=0xCAD3DC,      graph_fg_alpha=0.3,
    txt_radius=70,
    txt_weight=0,                  txt_size=9.0,
    txt_fg_colour=0xCAD3DC,        txt_fg_alpha=0.6,
    graduation_radius=57,
    graduation_thickness=0,        graduation_mark_thickness=2,
    graduation_unit_angle=30,
    graduation_fg_colour=0xCAD3DC, graduation_fg_alpha=0.3,
    },
}
-- SECONDS
clock_s = {
    {
    name='time',                   arg='%S',                    max_value=60,
    x=100,                         y=100,
    graph_radius=46,
    graph_thickness=2,
    graph_unit_angle=6,            graph_unit_thickness=2,
    graph_bg_colour=0xCAD3DC,      graph_bg_alpha=0.0,
    graph_fg_colour=0xCAD3DC,      graph_fg_alpha=0.2,
    txt_radius=40,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xCAD3DC,        txt_fg_alpha=0.3,
    graduation_radius=0,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=0,
    graduation_fg_colour=0xCAD3DC, graduation_fg_alpha=0.0,
    },
}

--------------------------------------------------------------------------------
--                                                                    gauge DATA
gauge = {
{
    name='cpu',                    arg='cpu0',                  max_value=100,
    x=100,                         y=100,
    graph_radius=17,
    graph_thickness=7,
    graph_start_angle=225,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xCAD3DC,      graph_bg_alpha=0.1,
    graph_fg_colour=0xCAD3DC,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=10,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xCAD3DC,        txt_fg_alpha=0.3,
    graduation_radius=17,
    graduation_thickness=1,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xCAD3DC, graduation_fg_alpha=0.7,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xCAD3DC,    caption_fg_alpha=0.3,
},
{
    name='cpu',                    arg='cpu1',                  max_value=100,
    x=100,                         y=100,
    graph_radius=9,
    graph_thickness=6,
    graph_start_angle=225,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xCAD3DC,      graph_bg_alpha=0.1,
    graph_fg_colour=0xCAD3DC,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=10,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xCAD3DC,        txt_fg_alpha=0.3,
    graduation_radius=9,
    graduation_thickness=1,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xCAD3DC, graduation_fg_alpha=0.7,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xCAD3DC,    caption_fg_alpha=0.3,
},

{
    name='memperc',                arg='',                      max_value=100,
    x=100,                         y=100,
    graph_radius=89,
    graph_thickness=5,
    graph_start_angle=225,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xCAD3DC,      graph_bg_alpha=0.1,
    graph_fg_colour=0xCAD3DC,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=80,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xCAD3DC,        txt_fg_alpha=0.3,
    graduation_radius=89,
    graduation_thickness=8,        graduation_mark_thickness=0.5,
    graduation_unit_angle=27,
    graduation_fg_colour=0xCAD3DC, graduation_fg_alpha=0.5,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xCAD3DC,    caption_fg_alpha=0.3,
},
{
    name='downspeedf',           arg='wlan0',                     max_value=1700,
    x=100,                          y=100,
    graph_radius=29,
    graph_thickness=5,
    graph_start_angle=225,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xCAD3DC,      graph_bg_alpha=0.1,
    graph_fg_colour=0xCAD3DC,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=34,
    txt_weight=0,                  txt_size=0.0,
    txt_fg_colour=0xCAD3DC,        txt_fg_alpha=0.5,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xCAD3DC, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xCAD3DC,    caption_fg_alpha=0.3,
},
{
    name='upspeedf',           arg='wlan0',                max_value=500,
    x=100,                          y=100,
    graph_radius=36,
    graph_thickness=5,
    graph_start_angle=225,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xCAD3DC,      graph_bg_alpha=0.1,
    graph_fg_colour=0xCAD3DC,      graph_fg_alpha=0.5,
    hand_fg_colour=0xEF5A29,       hand_fg_alpha=0.0,
    txt_radius=0,
    txt_weight=0,                  txt_size=0,
    txt_fg_colour=0xCAD3DC,        txt_fg_alpha=0.5,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xCAD3DC, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xCAD3DC,    caption_fg_alpha=0.2,
},

}

-------------------------------------------------------------------------------
--                                                                 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

-------------------------------------------------------------------------------
--                                                              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 % (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_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

-------------------------------------------------------------------------------
--                                                               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

-------------------------------------------------------------------------------
--                                                                         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_clock_rings(display)
        go_gauge_rings(display)
    end
    --# run another conky only when moc is running
    local moc_state = conky_parse("${if_running mocp}1${else}0${endif}")
    if moc_state == "1" then
        if mocRunning < 5 then
            mocRunning = mocRunning + 1
            if mocRunning == 5 then
                os.execute("conky -c /home/naik/.mocconkyrc &")
            end --# if mocRunning == 5 then
        elseif mocRunning >= 5 then
            local pass = nil --# display stuff here
        end --# if mocRunning < 5 then
    else
        if mocRunning ~= 0 then
            os.execute('pkill -f "conky -c /home/naik/.mocconkyrc"')
            mocRunning = 0
        end --# if mocRunning ~= 0 then
    end --# if moc_state == 1 then
    --# clear memory used by cairo
    
    cairo_surface_destroy(cs)
    cairo_destroy(display)
end

thanks for your great work and help so far! -naik


*kaum macht man es richtig, funktioniert es sofort*

Offline

#6437 2013-10-24 23:37:46

Habitual
#! Member
From: Youngstown, OH
Registered: 2010-09-10
Posts: 62
Website

Re: Conky v1.9 Thread

easysid wrote:

^ says someone from Youngstown !! big_smile big_smile

I had to read that a couple of times to catch the irony of it. wink

Yawnstown is more like it.

Your fancyclock rocks!


Success is 1% Inspiration
and 98% Perspiration and
2% atttention to details.

Offline

#6438 2013-10-25 01:09:03

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,727

Re: Conky v1.9 Thread

Did some gimp work to show moving gears inside of gauges.. reworked all the gears.
Added shadows and some detail to the gears, clock, gauges and glass. (original gears were nice easysid.. I just tweaked them a bit and added a few new ones).  smile

Still not finished, but here is what I have so far..
2013_10_24_1382662772_1440x900_scrot.jpg

Offline

#6439 2013-10-25 01:15:36

Inodoro Pereyra
#! Die Hard
From: Back in Buenos Aires
Registered: 2013-07-01
Posts: 844

Re: Conky v1.9 Thread

@Easysid: Like everybody said (and as it's clearly visible), awesome work!
Now, I have a little question/request for you (and I'm pretty sure you will easily see where I'm going with it): Can you make a lua pendulum? cool

Offline

#6440 2013-10-25 01:33:29

g33zr
#! Die Hard
From: Never Never Land
Registered: 2013-02-19
Posts: 635

Re: Conky v1.9 Thread

@falldown: It's great! Please share when you're "finished."  smile


It's never too late to learn something new! wink

OHCG | LXer

Offline

#6441 2013-10-25 03:45:48

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Habitual wrote:
easysid wrote:

^ says someone from Youngstown !! big_smile big_smile

I had to read that a couple of times to catch the irony of it. wink

Yawnstown is more like it.

Your fancyclock rocks!

lol lol Yawnstown - I like it!!!  lol  lol


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6442 2013-10-25 03:53:26

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

falldown wrote:

Did some gimp work to show moving gears inside of gauges.. reworked all the gears.
Added shadows and some detail to the gears, clock, gauges and glass. (original gears were nice easysid.. I just tweaked them a bit and added a few new ones).  smile

Still not finished, but here is what I have so far..
http://s21.postimg.org/6cyohf44z/2013_10_24_1382662772_1440x900_scrot.jpg

SHOCK!  STUNNED! You know that is just  ... just ... 

WOW!

Opinion: Remove the digital clock - just leave the Month Day# and Year.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6443 2013-10-25 04:10:32

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,727

Re: Conky v1.9 Thread

Thanks guys..
S11 I plan on adding a flip face clock (not sure of the actual term) as soon as I get it done.

I will share once all is in order... I have a bit more to add.
I am taking this steampunk theme as far as I can... So it will be ridicules when it is finished. smile

I have been wanting to do a steampunk theme for a couple of years now.. Thanks to easysid's for the inspiration.

Last edited by falldown (2013-10-25 04:13:38)

Offline

#6444 2013-10-25 04:21:15

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

falldown wrote:

S11 I plan on adding a flip face clock (not sure of the actual term) as soon as I get it done.

Like one of these:

fpb_33a.jpg

I know I have just the centre part, transparent where needed, here someplace I'll go looking if it will help.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6445 2013-10-25 05:02:06

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

This is what I am working on ... it's a re-make of the one I posted in Teo's weather thread ...
2013_10_25_01_34_07_1920x1080_Sector11.jpg

  1. Teo wrote the bash script that grabs the weather from a site that posts weather for the worlds major cities

  2. the bash script that grabs the world image I got from Habitual

    1. it updates the night shadow every 30 minutes - so it moves from right to left

    2. it updates the clouds every 3 hours

  3. conky's ${tztime} command gets the time for all the cities

    1. city names and time change colour depending on the DATE

The problems are:

  • I can't just copy and paste the part below TEXT into this - the image is smaller

  • clouds sometime cover areas I want to use so I have to wait until I can see them

  • sometime the night areas is easy to work with as large cities

  • sometimes daylight is better, again without cloud - so I have to wait

  • getting colours that work day and night with dark oe pure white clouds - so colours may still change - but look good for now

  • oh yea ... spacing - a biggie!

I made the font larger so there will me less cities but it's just for general info anyway ...

Why do it:  Because I can!

I see the + for New York and Miami need to me fixed (colour)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6446 2013-10-25 06:44:55

benginm
#! Junkie
From: In a time-warp to 2002!
Registered: 2012-11-11
Posts: 488

Re: Conky v1.9 Thread

Screenshot_10262013_10_14_19_AM.png

background yes
use_xft yes
xftfont monospace:pixelsize=8
xftalpha 0.8
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline n
draw_borders noo
draw_graph_borders yes
stippled_borders 0
border_inner_margin 4
border_outer_margin 0
default_color black
default_shade_color black
default_outline_color white
alignment top_right
gap_x 12
gap_y 12
no_buffers yes
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
use_spacer right
maximum_width 350


TEXT
#leet chars: ┤┤└└┴┴┐┐││┘┘┌┌├├┬┬┼┼┴┴── ││ ▽▼△▲▵▴▾▿
${alignr}${offset -32} ${font DejaVu Sans Mono:pixelsize==10}Crunchbang
${alignr}$font │  
${alignr}$font ${nodename} -─┤  
${alignr}$font < ${kernel} > kernel -─┤    │  
${alignr}$font < $machine >   arch -─┤    │  
${alignr}$font < $uptime > uptime -─┘    │  
${alignr}$font │  
${alignr}$font system -─┤  
${alignr}$font cpu -─┤    │  
${alignr}$font used -─┤    │    │  
${alignr}$font < ${cpu 1}% > cpu1 -─┤    │    │    │  
${alignr}$font < ${cpu 2}% > cpu2 -─┘    │    │    │  
${alignr}$font freq -─┤    │    │  
${alignr}$font < ${freq 1}mhz > cpu1 -─┤    │    │    │  
${alignr}$font < ${freq 2}mhz > cpu2 -─┘    │    │    │  
${alignr}$font < $loadavg > load -─┤    │    │  
${alignr}$font < ${top name 1}  ${top cpu 1} > -─┤    │    │  
${alignr}$font < ${top name 2}  ${top cpu 2} > -─┤    │    │  
${alignr}$font < ${top name 3}  ${top cpu 3} > -─┤    │    │  
${alignr}$font < ${top name 4}  ${top cpu 4} > -─┤    │    │  
${alignr}$font < ${top name 5}  ${top cpu 5} > -─┘    │    │  
${alignr}$font processes -─┤    │  
${alignr}$font < $processes >   total -─┤    │    │  
${alignr}$font < $running_processes > running -─┘    │    │  
${alignr}$font temperature -─┘    │  
${alignr}$font < ${hwmon temp 1} > tmp1 -─┘         │  
${alignr}$font │  
${alignr}$font resources -─┤  
${alignr}$font < $diskio_read >  read -─┤    │  
${alignr}$font < $diskio_write > write -─┤    │  
${alignr}$font ram -─┤    │  
${alignr}$font < $memperc% > used -─┤    │    │  
${alignr}$font < $mem/$memmax > -─┘    │    │    │  
${alignr}$font < ${top_mem name 1}  ${top_mem mem 1} > -─┤    │    │  
${alignr}$font < ${top_mem name 2}  ${top_mem mem 2} > -─┤    │    │  
${alignr}$font < ${top_mem name 3}  ${top_mem mem 3} > -─┤    │    │  
${alignr}$font < ${top_mem name 4}  ${top_mem mem 4} > -─┤    │    │  
${alignr}$font < ${top_mem name 5}  ${top_mem mem 5} > -─┘    │    │  
${alignr}$font < $swapperc% - $swap/$swapmax > swap -─┤    │  
${alignr}$font < ${swapbar 5,120} > -─┘    │    │  
${alignr}$font < ${fs_used /}/${fs_size /} > root -─┤    │  
${alignr}$font < ${fs_bar 5,120 /} > -─┘    │    │  
${alignr}$font < ${fs_used /home}/${fs_size /home} > home -─┤    │  
${alignr}$font < ${fs_bar 5,120 /home/sary/} > -─┘    │    │  
${alignr}$font < ${fs_used /usr/local}/${fs_size /usr/local} > local -─┘    │  
${alignr}$font < ${fs_bar 5,120 /home/sary/} > -─┘         │  
${alignr}$font │  
${alignr}$font net -─┘  
${alignr}$font < ${tcp_portmon 1 65535 count} > connections -─┤       
${alignr}$font < ${tcp_portmon 1 32767 count} > in / locale -─┤       
${alignr}$font < ${tcp_portmon 1 32767 rhost 0} ${tcp_portmon 1 32767 lservice 0} > -─┤    │       
${alignr}$font < ${tcp_portmon 1 32767 rhost 1} ${tcp_portmon 1 32767 lservice 1} > -─┤    │       
${alignr}$font < ${tcp_portmon 1 32767 rhost 2} ${tcp_portmon 1 32767 lservice 2} > -─┘    │       
${alignr}$font < ${tcp_portmon 32768 61000 count} > out / remote -─┤       
${alignr}$font < ${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0} > -─┤    │       
${alignr}$font < ${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1} > -─┤    │       
${alignr}$font < ${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2} > -─┤    │       
${alignr}$font < ${upspeedf wlan0} k/s> up -─┤       
${alignr}$font < ${upspeedgraph wlan0 8,120 8b2132 fe8608} > -─┘    │       
${alignr}$font < ${downspeedf wlan0} k/s > down -─┘       
${alignr}$font < ${downspeedgraph wlan0 8,120 8b2132 fe8608} > -─┘   

Edit: image link / conky code fixed!  Sector > props!

Last edited by benginm (2013-10-26 07:25:01)

Offline

#6447 2013-10-25 12:20:22

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

@ Sary

Interesting conky - doesn't match the image though.  May I suggest: http://postimage.org/
2013_10_25_09_18_55_362x1004_Sector11.jpg
Couple of things to note:

 25 Oct 13 | 08:58:55 ~
    $ Conky: /media/5/conky/sary.conky: 17: no such configuration: 'border_margin'
Conky: use_spacer should have an argument of left, right, or none.  'yes' seems to be some form of 'true', so defaulting to right.

border_margin is depreciated and split into two commands

border_inner_margin
     Inner border margin in pixels (the margin between the border and text).

border_outer_margin
     Outer border margin in pixels (the margin between the border and the edge of the window).

try:

border_inner_margin 4

Also use_spacer yes|no never was ... and the old style true|false has even changed

use_spacer
     Adds spaces around certain objects to stop them from moving other things around. Arguments are left, right, and none (default). The old true/false values are deprecated and default to right/none respectively. Note that this only helps if you are using a mono font, such as Bitstream Vera Sans Mono.

suggestion:

use_spacer right

EDIT:

One last thing:

upspeed     (net)
     Upload speed in suitable IEC units

upspeedf     (net)
     Upload speed in KiB with one decimal

downspeed     (net)
     Download speed in suitable IEC units

downspeedf     (net)
     Download speed in KiB with one decimal

Your code shows:

< ${upspeed wlan0} k/s >   up

if you want "k/s" use the "f"

< ${upspeedf wlan0} k/s >   up

Last edited by Sector11 (2013-10-25 12:56:17)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#6448 2013-10-25 14:06:51

easysid
#! CrunchBanger
From: India
Registered: 2013-01-25
Posts: 150

Re: Conky v1.9 Thread

falldown wrote:

Did some gimp work to show moving gears inside of gauges.. reworked all the gears.
Added shadows and some detail to the gears, clock, gauges and glass. (original gears were nice easysid.. I just tweaked them a bit and added a few new ones).  smile

Still not finished, but here is what I have so far..
http://s21.postimg.org/6cyohf44z/2013_10_24_1382662772_1440x900_scrot.jpg

That is superb. Everything is so much better smile . I had similar gears like the new ones (from deviantart), but didn't include them in the final package. Thank you for trying out the clock and improving it.

@falldown & Sector11: What is the update interval you're using. If it is 1s, let me know, as I have written a script with 1s as update interval. Takes out quite a few lines of code which then aren't needed.  (directly parse seconds, remove options like 'tick' etc). Basically just removing the code that won't be executed. Makes it cleaner.

I have noticed that removing the call to put_image in main, ( for displaying the clockbody) decreases the cpu usage. I can't think of any reason ?? can someone confirm that for me?

Offline

#6449 2013-10-25 14:13:18

easysid
#! CrunchBanger
From: India
Registered: 2013-01-25
Posts: 150

Re: Conky v1.9 Thread

Habitual wrote:

Your fancyclock rocks!

Inodoro Pereyra wrote:

@Easysid: Like everybody said (and as it's clearly visible), awesome work!

Thanks smile

Inodoro Pereyra wrote:

Now, I have a little question/request for you (and I'm pretty sure you will easily see where I'm going with it): Can you make a lua pendulum? cool

I have thought about it too. I think its doable (which is what I thought of the poodwaddle clock). The only issue is keeping in check the usage and syncing the pendulum with seconds ( and other animation if it is there.) I'll give it a shot. Can't promise anything though. tongue

Offline

Help fund CrunchBang, donate to the project!

#6450 2013-10-25 15:20:32

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

@ easysid

Didn't you change the script to use 1s on the original post  ... I am using a 1s update interval in conky.  With a fix you did.

I had to reinstall the lines for my extra gears and change the x y values in the LUA script.  big_smile

my conky window is

minimum_size 320 320	### w|h
maximum_width 320	### w

Of course they are gears I found I can't GIMP them.

I have noticed that removing the call to put_image in main, ( for displaying the clockbody) decreases the cpu usage. I can't think of any reason ?? can someone confirm that for me?

Obviously the code changed ... link please


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo