Page 2053 of 2323 FirstFirst ... 1053155319532003204320512052205320542055206321032153 ... LastLast
Results 20,521 to 20,530 of 23230

Thread: Post your .conkyrc files w/ screenshots

  1. #20521
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    @Sector11, doesn't matter what for, $execgraph works for him but with this same data $execigraph don't, and I second that.

    I've made simple SH script:
    Code:
    #!/bin/sh
    echo "50"
    and used it with
    Code:
    ${execgraph graph.sh}
    - graph started to be filled with 50% values

    but with
    Code:
    ${execigraph 1 graph.sh}
    - graph is empty


    Maybe it's a 1.9.0 bug

    When I'll have time I'll compile Conky myself to check it out.
    Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
    Linux user No.: 483055 | My Conky Pitstop corner | One4All project

  2. #20522
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by dk75 View Post
    @Sector11, doesn't matter what for, $execgraph works for him but with this same data $execigraph don't, and I second that.

    Maybe it's a 1.9.0 bug

    When I'll have time I'll compile Conky myself to check it out.
    Oh, I didn't see the 'original' post. My mistake, I was in a rush.

    I have to start paying more attention and stop doing six things at once.

    Thanks dk75.

  3. #20523
    Join Date
    Jul 2011
    Beans
    3

    Re: Post your .conkyrc files w/ screenshots

    Has anyone found a solution to the execigraph problem? I tried reinstalling Conky but that had no effect. I don't know much about Ubuntu so not sure where to go from here...

  4. #20524
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by facetoe View Post
    Has anyone found a solution to the execigraph problem? I tried reinstalling Conky but that had no effect. I don't know much about Ubuntu so not sure where to go from here...
    what are you trying to show?
    there are other ways to get graphs in conky, primarily via lua scripts using cairo graphics

    there are several scripts out and about that can emulate conky native graphs

    and it isnt too difficult to write a quick graph script

  5. #20525
    Join Date
    Jul 2011
    Beans
    3

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mrpeachy View Post
    what are you trying to show?
    there are other ways to get graphs in conky, primarily via lua scripts using cairo graphics

    there are several scripts out and about that can emulate conky native graphs

    and it isnt too difficult to write a quick graph script
    I'm just trying to show humidity and temperature through the day. Nothing fancy. I don't know anything about lua or cairo. Do you know any good resources to learn how to make graph scripts with lua?

  6. #20526
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by facetoe View Post
    I'm just trying to show humidity and temperature through the day. Nothing fancy. I don't know anything about lua or cairo. Do you know any good resources to learn how to make graph scripts with lua?
    that sounds like an interesting project
    ive been writing a how to for lua in conky
    part of that describes a cpu graph (see my sig)

    for temp/humidity you would have to set it on a timer
    i have written a bit about timers also in the more recent posts in the how to

    how are you getting your weather data?

  7. #20527
    Join Date
    Aug 2011
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    I have some line graph lua code you can use for that project if you think it would look better as a line graph.
    Building Conky | iCalendar Conky | Weather Script | Background List
    Intel Core i7-2600K - 3.40GHz | Asus P8Z68-V LE | 8GB RAM - 1866 MHz | Nvidia GeForce GTX 560 Ti

  8. #20528
    Join Date
    Jul 2011
    Beans
    3

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by mrpeachy View Post
    that sounds like an interesting project
    ive been writing a how to for lua in conky
    part of that describes a cpu graph (see my sig)

    for temp/humidity you would have to set it on a timer
    i have written a bit about timers also in the more recent posts in the how to
    Oh cool, I'll definitely read through those tutorials.

    how are you getting your weather data?
    I've got a Ruby script that pulls data from a weather site. The site updates every hour so I could just call the script from Conky every hour or so then write it to a file or something.


    Quote Originally Posted by arclance View Post
    I have some line graph lua code you can use for that project if you think it would look better as a line graph.
    That would be awesome arclance. I think a line graph would be even better then the execgraph one.

  9. #20529
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by facetoe View Post
    Oh cool, I'll definitely read through those tutorials.

    I've got a Ruby script that pulls data from a weather site. The site updates every hour so I could just call the script from Conky every hour or so then write it to a file or something.


    That would be awesome arclance. I think a line graph would be even better then the execgraph one.
    perhaps you could run your ruby script as a chron job and have it write to a text file. that way you would have the data if conky was running or not, and it would be a simple job for a lua script to read the file and graph the output

  10. #20530
    Join Date
    Aug 2011
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by facetoe View Post
    That would be awesome arclance. I think a line graph would be even better then the execgraph one.
    Okay here is the line graph code I wrote for my conky.
    Code:
    --###################################################
    --### Lua Example by arclance 2012-09-07 ############
    --### Line Graph With Outline And Color Gradient ####
    --###################################################
    --### CR : cairo surface from cairo_create(cs)
    --### data : table of values to graph
    --### max_Value : maximum value to display ie. the y-value of a point at the top of the graph box.  Data containing values larger than max_Value may not work correctly.
    --### table_Length : number of data points to plot from the table starting at the first table entry (data[1])
    --### BLX : x-position in pixels of the bottom left corner of the graph box
    --### BLY : y-position in pixels of the bottom left corner of the graph box
    --### ALPHA : alpha value (transparency) to use for the graph line. Does not affect graph outline alpha
    --### WIDTH : the x-axis separation of each data point in pixels. A value of 1 is reccomended
    --### This controls the width of the graph window so that that width of the graph window including the outline is equal to
    --### (table_Length * WIDTH) + (2 * outline_width) + 1
    --### graph_height : the y-size in pixels of the graph area inside the graph outline
    --### This controls the height of the graph window so that the height of the graph window including the outline is equal to
    --### graph_height + (2 * outline_width) + 1
    --### outline_width : the width of the line used to draw the outline around the graph area in pixels
    --### shade_color : a table holding the RBGA color to use to draw the shade on the graph outline. {R,G,B,A}
    --### outline_color : a table holding the RBGA color to use to draw the graph outline. {R,G,B,A}
    --### grad_color_1 : a table holding the RGB color to use for left end of the color gradient. {R,G,B}
    --### grad_color_2 : a table holding the RGB color to use for right end of the color gradient. {R,G,B}
    --### Gradient code is not perfect it may not work correctly with all color pairs
    
    function draw_line_graph(CR, data, max_Value, table_Length, BLX, BLY, ALPHA, WIDTH, graph_height, outline_width, shade_color, outline_color, grad_color_1, grad_color_2) --# only works with integer BLX and BLY
        cairo_set_antialias (CR, CAIRO_ANTIALIAS_NONE) --# don't antialias lines are too thin and gets blurred
        cairo_set_line_width (CR, outline_width)
        local graphWidth = (table_Length * WIDTH) + 1
        local outlineWidth = graphWidth
        local outlineHeight = graph_height + 1
        --# draw outline shade
        cairo_set_source_rgba (CR, shade_color[1], shade_color[2], shade_color[3], shade_color[4])
        cairo_rectangle (CR,(BLX + 1),(BLY + 1),outlineWidth,-outlineHeight)
        cairo_stroke (CR)
        --# draw outline
        cairo_set_source_rgba (CR, outline_color[1], outline_color[2], outline_color[3], outline_color[4])
        cairo_rectangle (CR,(BLX),(BLY),outlineWidth,-outlineHeight)
        cairo_stroke (CR)
        --# Start Drawing Graph Line
        cairo_set_line_width (CR, 1)
        --# move to start position
        local bar_height = ((data[1]/max_Value)*graph_height) + 1
        cairo_move_to (CR,((BLX)+(WIDTH/2)+(WIDTH)),(BLY - bar_height))
        for i=1,table_Length do
            --# Get gradient color
            local Red,Green,Blue = linear_gradient(grad_color_1, grad_color_2, graphWidth, (graphWidth - (i*WIDTH)))
            cairo_set_source_rgba (CR,Red,Green,Blue,ALPHA)
            --# calculate data y positon
            local bar_height = ((data[i]/max_Value)*graph_height) + 1
            --# draw line from last point to current point
            if data[i] <= max_Value then --# don't draw the point if it is outside of the graph area.  Still need to move the point so the Line will re-enter the graph in the right place.  There will be a small break in the graph were is re-enters with this simple fix.
                cairo_line_to (CR, ((BLX)+(WIDTH/2)+((i-1)*WIDTH)),(BLY - bar_height))
                cairo_stroke (CR)
            end --# if data[i] <= max_Value then
            --# move to current point
            cairo_move_to (CR,((BLX)+(WIDTH/2)+((i-1)*WIDTH)),(BLY - bar_height))
        end --# i=1,table_length do
        cairo_set_antialias (CR, CAIRO_ANTIALIAS_DEFAULT)
        return CR
    end --# function draw_line_graph()
    
    function linear_gradient(Left_Color, Right_Color, Length, Position)
        local positionPercent = Position/Length
        local red = Right_Color[1] + (math.abs(Right_Color[1] - Left_Color[1]) * positionPercent)
        local green = Right_Color[2] + (math.abs(Right_Color[2] - Left_Color[2]) * positionPercent)
        local blue = Right_Color[3] + (math.abs(Right_Color[3] - Left_Color[3]) * positionPercent)
        return red,green,blue
    end --# function linear_gradient()
    Last edited by arclance; September 8th, 2012 at 02:27 AM.
    Building Conky | iCalendar Conky | Weather Script | Background List
    Intel Core i7-2600K - 3.40GHz | Asus P8Z68-V LE | 8GB RAM - 1866 MHz | Nvidia GeForce GTX 560 Ti

Page 2053 of 2323 FirstFirst ... 1053155319532003204320512052205320542055206321032153 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •