Page 1192 of 2325 FirstFirst ... 1926921092114211821190119111921193119412021242129216922192 ... LastLast
Results 11,911 to 11,920 of 23245

Thread: Post your .conkyrc files w/ screenshots

  1. #11911
    Join Date
    Dec 2008
    Location
    The Desert
    Beans
    281
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Jackzor View Post
    Code:
    ${color #0077ff}Processes:${color #0077ff} $processes  ${color #0077ff}Run:${color #0077ff} $running_processes ${color #0077ff}CPU:${color #0077ff} ${i2c temp 2}C${color #0077ff} ${color #0077ff}MB:${color #0077ff} ${i2c temp 1}C
    ${color #0077ff}CPU Usage              PID            CPU%            MEM%
    ${color #0077ff} ${top name 1}      ${top pid 1}      ${top cpu 1}      ${top mem 1}
    ${color #0077ff} ${top name 2}      ${top pid 2}      ${top cpu 2}      ${top mem 2}
    ${color #0077ff} ${top name 3}      ${top pid 3}      ${top cpu 3}      ${top mem 3}
    ${color #0077ff}Mem Usage
    ${color #0077ff} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
    ${color #0077ff} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
    ${color #0077ff} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}
    Anyone know how to line this up to where it will cut text off the Process name instead of moving it over and making it all out of whack?
    you could use goto's. read this.
    I'm a super power user

  2. #11912
    Join Date
    Dec 2008
    Location
    The Desert
    Beans
    281
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by arzali View Post
    lua_draw_hook_pre load_widgets
    tried it this is the error i got:
    Code:
    djyoung4@Daniels-computer:~$ conky
    Conky: forked to background, pid is 13082
    djyoung4@Daniels-computer:~$ 
    Conky: desktop window (22000a9) is subwindow of root window (10c)
    Conky: drawing to desktop window
    Conky: drawing to double buffer
    Conky: llua_do_call: function conky_load_widgets execution failed: /home/djyoung4/Documents/code/luarings:280: attempt to call global 'draw_atext' (a nil value)
    I'm a super power user

  3. #11913
    Join Date
    Nov 2009
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by djyoung4 View Post
    tried it this is the error i got:
    im using it like this:
    conkyrc
    Code:
    #--- Conky by londonali1010 ---#
    
    background no
    net_avg_samples 2
    cpu_avg_samples 1
    no_buffers yes
    double_buffer yes
    update_interval 1
    
    own_window yes
    own_window_type override
    own_window_class conky
    own_window_hints undecorated,skip_taskbar,skip_pager,sticky,below
    own_window_argb_visual yes
    #own_window_argb_value 100
    own_window_transparent yes
    
    
    border_inner_margin 0
    border_outer_margin 0
    default_color black
    color1 99a663
    default_outline_color white
    default_shade_color white
    draw_borders no
    draw_graph_borders yes
    stippled_borders 0
    draw_outline no
    draw_shades no
    show_graph_scale no
    show_graph_range no
    
    use_xft yes
    xftfont Sawasdee:size=24
    xftalpha 0.8
    uppercase no
    
    minimum_size 1200 800
    #maximum_width 120
    use_spacer none
    alignment tr
    gap_x 0
    gap_y 0
    
    #${voffset 200}${goto 10}${time %B}${alignr 10}${time %Y}
    #${goto 10}${cpubar cpu3 1,260}
    #${goto 10}${font DejaVu Sans Mono:size=16}${execpi 60 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/                     /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${goto #0} /' | sed /" $DJS "/s/" $DJS "/" "'${color1}'"$DJS"'${color}'" "/}
    #${goto 10}${cpubar cpu3 1,260}
    
    lua_load /home/live/Scripts/text.lua
    lua_draw_hook_pre load_widgets
    
    TEXT
    test.lua
    Code:
    --[[
    Conky Widgets by londonali1010 (2009)
    
    Call this script in Conky using the following before TEXT (assuming you save this script to ~/scripts/conky_widgets.lua):
        lua_load ~/Scripts/conky_widgets.lua
        lua_draw_hook_pre load_widgets ]]
    
    require 'cairo'
    function draw_atext()
        if conky_window==nil then return end
        local w=conky_window.width
        local h=conky_window.height
        local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
        cr=cairo_create(cs)
    
        
            
    -- Font
    cairo_select_font_face (cr, "Verana", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    
    -- font size
    cairo_set_font_size (cr, 30.0);
    
    --font color
    cairo_set_source_rgba (cr, 1, 1, 1, 1);
    
    cairo_translate (cr, 128.0, 128.0);
    -- angle
    cairo_rotate(cr,-0.38);
    
    -- text position
    cairo_move_to (cr, 190.0, 470.0);
    
    -- shown text
    cairo_show_text (cr, conky_parse('${time %H:%M}'))
    
    
    cairo_rotate(cr,-0.10);
    cairo_set_font_size (cr, 12.0);
    cairo_move_to (cr, 100.0, 480.0);
    cairo_show_text (cr, conky_parse('${time  %h %d}'))
    
    cairo_rotate(cr,-0.18);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, -60.0, 485.0);
    cairo_show_text (cr, conky_parse('${time %A}'))
    
    cairo_rotate(cr,-0.90);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, -457.0, 243.0);
    cairo_show_text (cr, conky_parse('${if_match ${execi 5 ~/Documents/code/hddmonit.sh} > 60}${color red}${execi 5 ~/Documents/code/hddmonit.sh}$color$else${execi 5 ~/Documents/code/hddmonit.sh}$endif°C'))
    
    cairo_rotate(cr,2.15);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 465.0, 268.0);
     cairo_show_text (cr, conky_parse('Gmail: ${execi 600 conkyEmail --servertype=IMAP --servername=imap.googlemail.com --username=xyz --password=xyz --ssl}'))
    
    cairo_rotate(cr,-0.42);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 380.0, 460.0);
    cairo_show_text (cr, conky_parse('${execi 3600 conkyForecast -i --location=USAZ0207 --datatype=LT}'))
    
    cairo_rotate(cr,-0.05);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 410.0, 485.0);
    cairo_show_text (cr, conky_parse('Now Playing: '))
    
    cairo_rotate(cr,-0.08);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 470.0, 530.0);
    cairo_show_text (cr, conky_parse('${exec rhythmbox-client --no-start --print-playing}'))
    
    cairo_rotate(cr,-0.15);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 670.0, 640.0);
    cairo_show_text (cr, conky_parse('${execi 3600 conkyForecast -i --location=USAZ0207 --datatype=CC}'))
    
    cairo_rotate(cr,-0.50);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 395.0, 950.0);
    cairo_show_text (cr, conky_parse('${execi 3600 conkyForecast -i --location=USAZ0207 --datatype=HT}'))
    
    cairo_rotate(cr,-0.90);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, -460.0, 930.0);
    cairo_show_text (cr, conky_parse('${if_match ${acpitemp} > 60}${color red}${acpitemp}$color$else${acpitemp}$endif°C'))
    
    cairo_rotate(cr,1.90);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 935.0, 120.0);
    cairo_show_text (cr, conky_parse('U:${upspeed eth1}/s '))
    
    cairo_rotate(cr,-0.10);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 860.0, 225.0);
    cairo_show_text (cr, conky_parse('D:${downspeed eth1}/s'))
    
    cairo_stroke (cr);
    
    
    
    
    end
    
    
    --[[
    Ring Meters by londonali1010 (2009)
     
    This script draws percentage meters as rings. It is fully customisable; all options are described in the script.
     
    IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num > 5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num > 3; conversely if you update Conky every 0.5s, you should use update_num > 10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.
     
    To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
        lua_load ~/scripts/rings-v1.2.1.lua
        lua_draw_hook_pre ring_stats
     
    Changelog:
    + v1.2.1 -- Fixed minor bug that caused script to crash if conky_parse() returns a nil value (20.10.2009)
    + v1.2 -- Added option for the ending angle of the rings (07.10.2009)
    + v1.1 -- Added options for the starting angle of the rings, and added the "max" variable, to allow for variables that output a numerical value rather than a percentage (29.09.2009)
    + v1.0 -- Original release (28.09.2009)
    ]]
     
    settings_table = {
        {
            name='cpu',
            arg='cpu1',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.4,
            fg_colour=0xffffff,
            fg_alpha=0.8,
            x=420, y=2545,
            radius=2000,
            thickness=5,
            start_angle=12,
            end_angle=16.6
        },
        {
            name='cpu',
            arg='cpu2',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xffffff,
            fg_alpha=0.6,
            x=993, y=642,
            radius=13,
            thickness=5,
            start_angle=15,
            end_angle=160
        },
        
        {
            name='fs_free_perc',
            arg='/',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xffffff,
            fg_alpha=0.6,
            x=800, y=-530,
            radius=1200,
            thickness=5,
            start_angle=185.7,
            end_angle=199
        },
        {
            name='memperc',
            arg='',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xffffff,
            fg_alpha=0.6,
            x=405, y=582,
            radius=20,
            thickness=5,
            start_angle=190,
            end_angle=330
        },
        {
            name='swap',
            arg='',
            max=100,
            bg_colour=0xffffff,
            bg_alpha=0.2,
            fg_colour=0xffffff,
            fg_alpha=0.6,
            x=625, y=830,
            radius=350,
            thickness=5,
            start_angle=320,
            end_angle=340
        },
    }
     
    require 'cairo'
     
    function rgb_to_r_g_b(colour,alpha)
        return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end
     
    function draw_ring(cr,t,pt)
        local w,h=conky_window.width,conky_window.height
     
        local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
        local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']
     
        local angle_0=sa*(2*math.pi/360)-math.pi/2
        local angle_f=ea*(2*math.pi/360)-math.pi/2
        local t_arc=t*(angle_f-angle_0)
     
        -- Draw background ring
     
        cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
        cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
        cairo_set_line_width(cr,ring_w)
        cairo_stroke(cr)
     
        -- Draw indicator ring
     
        cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
        cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
        cairo_stroke(cr)        
    end
     
    function conky_ring_stats()
        local function setup_rings(cr,pt)
            local str=''
            local value=0
     
            str=string.format('${%s %s}',pt['name'],pt['arg'])
            str=conky_parse(str)
     
            value=tonumber(str)
            if value == nil then value = 0 end
            pct=value/pt['max']
     
            draw_ring(cr,pct,pt)
        end
     
        if conky_window==nil then return end
        local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
     
        local cr=cairo_create(cs)    
     
        local updates=conky_parse('${updates}')
        update_num=tonumber(updates)
     
        if update_num>5 then
            for i in pairs(settings_table) do
                setup_rings(cr,settings_table[i])
            end
        end
    end
    
    function conky_load_widgets()
     if conky_window==nil then return end
        local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
        
        local cr=cairo_create(cs)    
        
        local updates=conky_parse('${updates}')
        update_num=tonumber(updates)
        
        if update_num>5 then
           draw_atext()
           conky_ring_stats()
        end
    end
    and it works look


    show me your conkyrc and script perhaps i can find the error.

  4. #11914
    Join Date
    Dec 2008
    Location
    The Desert
    Beans
    281
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by arzali View Post
    show me your conkyrc and script perhaps i can find the error.
    .conkyrc:
    Code:
    # Conky sample configuration
    #
    # the list of variables has been removed from this file in favour
    # of keeping the documentation more maintainable.
    # Check http://conky.sf.net for an up-to-date-list.
    
    # set to yes if you want Conky to be forked in the background
    background yes
    
    # X font when Xft is disabled, you can pick one with program xfontsel
    #font 5x7
    #font 6x10
    #font 7x13
    #font 8x13
    #font 9x15
    #font *mintsmild.se*
    #font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
    
    # Use Xft?
    use_xft yes
    
    # Xft font when Xft is enabled
    xftfont Bitstream Vera Sans Mono:size=8
    
    # Text alpha when using Xft
    xftalpha 0.8
    
    # Print everything to stdout?
    # out_to_console no
    
    # MPD host/port
    # mpd_host localhost
    # mpd_port 6600
    # mpd_password tinker_bell
    
    # Print everything to console?
    # out_to_console no
    
    # mail spool
    mail_spool $MAIL
    
    # Update interval in seconds
    update_interval 5.0
    
    # This is the number of times Conky will update before quitting.
    # Set to zero to run forever.
    total_run_times 0
    
    # Create own window instead of using desktop (required in nautilus)
    own_window no
    
    # If own_window is yes, you may use type normal, desktop or override
    own_window_type desktop
    
    # Use pseudo transparency with own_window?
    own_window_transparent yes
    
    # If own_window_transparent is set to no, you can set the background colour here
    own_window_colour black
    
    # If own_window is yes, these window manager hints may be used
    #own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # Minimum size of text area
    minimum_size 280 5
    
    # Maximum width
    maximum_width 10
    
    # Draw shades?
    draw_shades yes
    
    # Draw outlines?
    draw_outline no
    
    # Draw borders around text
    draw_borders no
    
    # Draw borders around graphs
    draw_graph_borders no
    
    # Stippled borders?
    stippled_borders 8
    
    # border margins
    border_inner_margin 4
    
    # border width
    border_width 1
    
    # Default colors and also border colors
    default_color white
    default_shade_color black
    default_outline_color black
    
    # Text alignment, other possible values are commented
    alignment top_left
    #alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    #alignment top_middle
    #alignment bottom_middle
    #alignment none
    
    # Gap between borders of screen and text
    # same thing as passing -x at command line
    gap_x 1
    gap_y 1
    
    # Subtract file system buffers from used memory?
    no_buffers yes
    
    # set to yes if you want all text to be in uppercase
    uppercase no
    
    # number of cpu samples to average
    # set to 1 to disable averaging
    cpu_avg_samples 2
    
    # number of net samples to average
    # set to 1 to disable averaging
    net_avg_samples 2
    
    # Force UTF8? note that UTF8 support required XFT
    override_utf8_locale yes
    
    # Add spaces to keep things from moving about?  This only affects certain objects.
    use_spacer none
    
    # Shows the maximum value in scaled graphs.
    show_graph_scale no
    
    # Shows the time range covered by a graph.
    show_graph_range no
    
    # Allow each port monitor to track at most this many connections (if 0 or not set, default is 256)
    #max_port_monitor_connections 256
    
    # Maximum number of special things, e.g. fonts, offsets, aligns, etc.
    #max_specials 512
    
    # Maximum size of buffer for user text, i.e. below TEXT line.
    #max_user_text 16384
    
    # Timing interval for music player thread, e.g. mpd, audacious
    #music_player_interval (update_interval is default)
    
    # Strictness of if_up. One of: up, link or address. The later ones imply the further ones.
    # Defaults to up.
    #if_up_strictness address
      #-d DATATYPE, --datatype=DATATYPE
                            #[default: HT] The data type options are: DW (Day of
                            #Week), WF (Weather Font output), WI (Weather Icon
                            #Path), LT (Forecast:Low Temp,Current:Feels Like Temp),
                            #HT (Forecast:High Temp,Current:Current Temp), CC
                            #(Current Conditions), CT (Conditions Text), PC
                            #(Precipitation Chance), HM (Humidity), VI
                            #(Visibility), WD (Wind Direction), WA (Wind Angle - in
                            #degrees), WS (Wind Speed), WG (Wind Gusts), BF
                            #(Bearing Font), BI (Bearing Icon Path), BS (Bearing
                            #font with Speed), CN (City Name), CO (Country), OB
                            #(Observatory), SR (SunRise), SS (SunSet), DL
                            #(DayLight), MP (Moon Phase), MF (Moon Font), MI (Moon
                            #Icon Path), BR (Barometer Reading), BD (Barometer
                            #Description), UI (UV Index), UT (UV Text), DP (Dew
                            #Point), LU (Last Update at weather.com), LF (Last
                            #Fetch from weather.com). Not applicable at command
                            #line when using templates.
    
    
    # variable is given either in format $variable or in ${variable}. Latter
    # allows characters right after the variable and must be used in network
    # stuff because of an argument
    
    # stuff after 'TEXT' will be formatted on screen
    # -- Lua Load -- #
    lua_load ~/Documents/code/luarings
    lua_draw_hook_pre load_widgets
    
    TEXT
    ${goto 320}${voffset 500}
    luarings:
    Code:
    --[[
    Conky Widgets by londonali1010 (2009)
    
    Call this script in Conky using the following before TEXT (assuming you save this script to ~/scripts/conky_widgets.lua):
        lua_load ~/Scripts/conky_widgets.lua
        lua_draw_hook_pre draw_text
     ]]
    
    require 'cairo'
    function conky_draw_text()
        if conky_window==nil then return end
        local w=conky_window.width
        local h=conky_window.height
        local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
        cr=cairo_create(cs)
    
        
            
    -- Font
    cairo_select_font_face (cr, "Verana", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    
    -- font size
    cairo_set_font_size (cr, 30.0);
    
    --font color
    cairo_set_source_rgba (cr, 1, 1, 1, 1);
    
    cairo_translate (cr, 128.0, 128.0);
    -- angle
    cairo_rotate(cr,-0.38);
    
    -- text position
    cairo_move_to (cr, 190.0, 470.0);
    
    -- shown text
    cairo_show_text (cr, conky_parse('${time %H:%M}'))
    
    
    cairo_rotate(cr,-0.10);
    cairo_set_font_size (cr, 12.0);
    cairo_move_to (cr, 100.0, 480.0);
    cairo_show_text (cr, conky_parse('${time  %h %d}'))
    
    cairo_rotate(cr,-0.18);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, -60.0, 485.0);
    cairo_show_text (cr, conky_parse('${time %A}'))
    
    cairo_rotate(cr,-0.90);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, -457.0, 243.0);
    cairo_show_text (cr, conky_parse('${if_match ${execi 5 ~/Documents/code/hddmonit.sh} > 60}${color red}${execi 5 ~/Documents/code/hddmonit.sh}$color$else${execi 5 ~/Documents/code/hddmonit.sh}$endif°C'))
    
    cairo_rotate(cr,2.15);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 465.0, 268.0);
    cairo_show_text (cr, conky_parse('Gmail: ${execi 600 conkyEmail --servertype=IMAP --servername=imap.googlemail.com --username=djyoung4 --password=LlAb7821782! --ssl}'))
    
    cairo_rotate(cr,-0.42);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 380.0, 460.0);
    cairo_show_text (cr, conky_parse('${execi 3600 conkyForecast -i --location=USAZ0207 --datatype=LT}'))
    
    cairo_rotate(cr,-0.05);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 410.0, 485.0);
    cairo_show_text (cr, conky_parse('Now Playing: '))
    
    cairo_rotate(cr,-0.08);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 470.0, 530.0);
    cairo_show_text (cr, conky_parse('${exec rhythmbox-client --no-start --print-playing}'))
    
    cairo_rotate(cr,-0.15);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 670.0, 640.0);
    cairo_show_text (cr, conky_parse('${execi 3600 conkyForecast -i --location=USAZ0207 --datatype=CC}'))
    
    cairo_rotate(cr,-0.50);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 395.0, 950.0);
    cairo_show_text (cr, conky_parse('${execi 3600 conkyForecast -i --location=USAZ0207 --datatype=HT}'))
    
    cairo_rotate(cr,-0.90);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, -460.0, 930.0);
    cairo_show_text (cr, conky_parse('${if_match ${acpitemp} > 60}${color red}${acpitemp}$color$else${acpitemp}$endif°C'))
    
    cairo_rotate(cr,1.90);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 935.0, 120.0);
    cairo_show_text (cr, conky_parse('U:${upspeed eth1}/s '))
    
    cairo_rotate(cr,-0.10);
    cairo_set_font_size (cr, 14.0);
    cairo_move_to (cr, 860.0, 225.0);
    cairo_show_text (cr, conky_parse('D:${downspeed eth1}/s'))
    
    cairo_stroke (cr);
    
    
    end
    
    
    --[[
    Ring Meters by londonali1010 (2009)
     
    This script draws percentage meters as rings. It is fully customisable; all options are described in the script.
     
    IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num > 5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num > 3; conversely if you update Conky every 0.5s, you should use update_num > 10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.
     
    To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
    	lua_load ~/scripts/rings-v1.2.1.lua
    	lua_draw_hook_pre ring_stats
     
    Changelog:
    + v1.2.1 -- Fixed minor bug that caused script to crash if conky_parse() returns a nil value (20.10.2009)
    + v1.2 -- Added option for the ending angle of the rings (07.10.2009)
    + v1.1 -- Added options for the starting angle of the rings, and added the "max" variable, to allow for variables that output a numerical value rather than a percentage (29.09.2009)
    + v1.0 -- Original release (28.09.2009)
    ]]
     
    settings_table = {
    	{
    		name='cpu',
    		arg='cpu1',
    		max=100,
    		bg_colour=0xffffff,
    		bg_alpha=0.4,
    		fg_colour=0xffffff,
    		fg_alpha=0.8,
    		x=420, y=2545,
    		radius=2000,
    		thickness=5,
    		start_angle=12,
    		end_angle=16.6
    	},
    	{
    		name='cpu',
    		arg='cpu2',
    		max=100,
    		bg_colour=0xffffff,
    		bg_alpha=0.2,
    		fg_colour=0xffffff,
    		fg_alpha=0.6,
    		x=993, y=642,
    		radius=13,
    		thickness=5,
    		start_angle=15,
    		end_angle=160
    	},
    	{
    		name='battery_percent',
    		arg='BAT0',
    		max=100,
    		bg_colour=0xffffff,
    		bg_alpha=0.2,
    		fg_colour=0xffffff,
    		fg_alpha=0.6,
    		x=800, y=-530,
    		radius=1200,
    		thickness=5,
    		start_angle=170.8,
    		end_angle=185.3
    	},
    	{
    		name='fs_free_perc',
    		arg='/',
    		max=100,
    		bg_colour=0xffffff,
    		bg_alpha=0.2,
    		fg_colour=0xffffff,
    		fg_alpha=0.6,
    		x=800, y=-530,
    		radius=1200,
    		thickness=5,
    		start_angle=185.7,
    		end_angle=199
    	},
    	{
    		name='memperc',
    		arg='',
    		max=100,
    		bg_colour=0xffffff,
    		bg_alpha=0.2,
    		fg_colour=0xffffff,
    		fg_alpha=0.6,
    		x=405, y=582,
    		radius=20,
    		thickness=5,
    		start_angle=190,
    		end_angle=330
    	},
    	{
    		name='swap',
    		arg='',
    		max=100,
    		bg_colour=0xffffff,
    		bg_alpha=0.2,
    		fg_colour=0xffffff,
    		fg_alpha=0.6,
    		x=625, y=830,
    		radius=350,
    		thickness=5,
    		start_angle=320,
    		end_angle=340
    	},
    }
     
    require 'cairo'
     
    function rgb_to_r_g_b(colour,alpha)
    	return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end
     
    function draw_ring(cr,t,pt)
    	local w,h=conky_window.width,conky_window.height
     
    	local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
    	local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']
     
    	local angle_0=sa*(2*math.pi/360)-math.pi/2
    	local angle_f=ea*(2*math.pi/360)-math.pi/2
    	local t_arc=t*(angle_f-angle_0)
     
    	-- Draw background ring
     
    	cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
    	cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
    	cairo_set_line_width(cr,ring_w)
    	cairo_stroke(cr)
     
    	-- Draw indicator ring
     
    	cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
    	cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
    	cairo_stroke(cr)		
    end
     
    function conky_ring_stats()
    	local function setup_rings(cr,pt)
    		local str=''
    		local value=0
     
    		str=string.format('${%s %s}',pt['name'],pt['arg'])
    		str=conky_parse(str)
     
    		value=tonumber(str)
    		if value == nil then value = 0 end
    		pct=value/pt['max']
     
    		draw_ring(cr,pct,pt)
    	end
     
    	if conky_window==nil then return end
    	local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
     
    	local cr=cairo_create(cs)	
     
    	local updates=conky_parse('${updates}')
    	update_num=tonumber(updates)
     
    	if update_num>5 then
    		for i in pairs(settings_table) do
    			setup_rings(cr,settings_table[i])
    		end
    	end
    end
    
    function conky_load_widgets()
     if conky_window==nil then return end
        local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
        
        local cr=cairo_create(cs)    
        
        local updates=conky_parse('${updates}')
        update_num=tonumber(updates)
        
        if update_num>5 then
           draw_atext()
           conky_ring_stats()
        end
    end
    I'm a super power user

  5. #11915
    Join Date
    Dec 2008
    Location
    The Desert
    Beans
    281
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    got it. thanks to dmillerct and arzali
    conky on the road:
    Attached Images Attached Images
    I'm a super power user

  6. #11916
    Join Date
    Aug 2008
    Location
    florida
    Beans
    28
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    wow... this thread is going longer and longer and its hard to read all of it or even search.

    i used to run conky on hardy and now im on karmic and i kinda miss the conky on my desktop. but conky community really grew. there are really good stuff that i dont get right now.

    can you point me in the right direction on how to add a image on a conky?

  7. #11917
    Join Date
    Jul 2005
    Location
    The Netherlands
    Beans
    209
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by arzali View Post
    if it helps you can use luarings and text with one script.

    <SNIP>
    Or you could use my library which does loads of fun things and you only have to modify one script!!
    Laptop: i7 4800MQ 2.7GHz (~3.7GHz); 2x 4GB Kingston HyperX Genesis 1600MHz; Nvidia 780M 4GB; Crucial M4 256GB SSD; Ubuntu 14.04 LTS x64 and Windows 8.1 x64.
    Ubuntu #8076 / Linux #429448

  8. #11918
    Join Date
    Nov 2009
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by proxess View Post
    Or you could use my library which does loads of fun things and you only have to modify one script!!
    That sounds nice but where do i get it?

  9. #11919
    Join Date
    Aug 2009
    Beans
    1

    Re: Post your .conkyrc files w/ screenshots


  10. #11920
    Join Date
    Jul 2005
    Location
    The Netherlands
    Beans
    209
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by arzali View Post
    That sounds nice but where do i get it?
    Weeeell... right here. It's in development still, but quite easy to use.

    main.lua - technically the only file you have to modify. You may need to modify the others tho due to the location of rgb_to_r_g_b.lua
    Code:
    --[[
            Proxess' Lua Library
                    All credit goes to the CCCC, who's "usernames" I'll mention as soon as I write them down!
                    ==> Londonali2010; arpinux; mobilediesel; dmillerct; Bruce M; yk1000; Crinos512;
    
            Library Capabilities:
              Centralized control - Create various main-like scripts for various Conkys, no repeated functions.
              Panels (ex-Background) - Gradient background with as many colours as desired. Multiple panels.
              Rings - Rings where values can be negative. Work clockwise, counter-clockwise and from a centre point.
              Text - Renders any text to any angle. Possible to make values display zeros.
                            ex.: (4% as 004% or -4ºC as -04ºC).
    ]]
    require 'cairo'
    
    package.path = "/home/proxess/.conkygui/scripts/?.lua"
    require 'panel'
    require 'ring'
    require 'text'
    require 'wave'
    
    
    function conky_main()
            if conky_window == nil then return end
    
            local cairo_struct = cairo_xlib_surface_create(conky_window.display,conky_window.drawable,
                                    conky_window.visual, conky_window.width,conky_window.height)
            cairo_render = cairo_create(cairo_struct)
    
    
            -- Full Panel
            pane_col_01 = {grad_c = 0x000000, grad_a = 0.4}
            panel(cairo_render, 0, 0, conky_window.width-4, conky_window.height -60, 0, 0, 0, 0,
                            pane_col_01, 0, 0, conky_window.width-4, conky_window.height -60)
    
            -- Fade Right
            pane_col_03 = {{grad_c = 0x000000, grad_a = 0.4, grad_stop = 0.0},
                            {grad_c = 0x000000, grad_a = 0.0, grad_stop = 1.0}}
            panel(cairo_render, conky_window.width-4, 0, conky_window.width, conky_window.height -60, 0, 0, 0, 0,
                            pane_col_03, conky_window.width-4, (conky_window.height -60)/2, conky_window.width, (conky_window.height -60)/2)
    
            -- Memory
            ring(cairo_render,
                    'memperc', '', 0, 100, 24, 660,
                    20, 4, -180, 180,
                    0xFFFFFF, 0.2, 0xFFFFFF, 0.6,
                    2, true, true,
                    70, 0xFF0000, 0.2, 0xFF8800, 0.7,
                    90, 0xFF0000, 0.2, 0xFF0000, 0.9)
    
            -- Core 1
            ring(cairo_render,
                    'cpu', 'cpu1', 0, 100, 24, 710,
                    20, 4, -90, 90,
                    0xFFFFFF, 0.2, 0xFFFFFF, 0.6,
                    0, true, true,
                    70, 0xFF0000, 0.2, 0xFF8800, 0.7,
                    90, 0xFF0000, 0.2, 0xFF0000, 0.9)
    
            -- Core 2
            ring(cairo_render,
                    'cpu', 'cpu2', 0, 100, 24, 730,
                    20, 4, -90, 90,
                    0xFFFFFF, 0.2, 0xFFFFFF, 0.6,
                    1, true, true,
                    70, 0xFF0000, 0.2, 0xFF8800, 0.7,
                    90, 0xFF0000, 0.2, 0xFF0000, 0.9)
    
            -- Destroy Render
            cairo_destroy(cairo_render)
    
    
            -- Text
            cairo_render = cairo_create(cairo_struct)
            text(cairo_render,
                    'memperc', '', '', '%', 8, 668, 'FreeMono',
                    CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 10, 0xFFFFFF, 0.8, -0.25, true, 3)
            cairo_destroy(cairo_render)
    
            cairo_render = cairo_create(cairo_struct)
            text(cairo_render,
                    'cpu', 'cpu1', '', '%', 8, 708, 'FreeMono',
                    CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 10, 0xFFFFFF, 0.8, -0.25, true, 3)
            cairo_destroy(cairo_render)
    
            cairo_render = cairo_create(cairo_struct)
            text(cairo_render,
                    'cpu', 'cpu2', '', '%', 8, 728, 'FreeMono',
                    CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD, 10, 0xFFFFFF, 0.8, -0.25, true, 3)
            cairo_destroy(cairo_render)
    
            cairo_render = cairo_create(cairo_struct)
            wave(cairo_render)
            cairo_destroy(cairo_render)
    end
    
    --[[
    Available Scripts:
    
    ring(cairo_render,
                    conky_var, conky_arg, var_val_min, var_val_max, pos_x, pos_y,
                    ring_radius, ring_thickness, ring_angle_start, ring_angle_end,
                    background_c, background_a, foreground_c, foreground_a,
                    ring_dir, colour_coding, coding_direction,
                    warning, warning_bgc, warning_bga, warning_fgc, warning_fga,
                    danger, danger_bgc, danger_bga, danger_fgc, danger_fga)
    
    gradient_struct = {{grad_c = <COLOUR>, grad_a = <ALPHA>, grad_stop = <GRADIENT STOP>}, ...}
    panel(cairo_render, tl_x, tl_y, br_x, br_y, radius_tl, radius_tr, radius_bl, radius_br,
                            gradient_struct, gradline_from_x, gradline_from_y, gradline_to_x, gradline_to_y)
    
    
    text(cairo_render,
                    conky_var, conky_arg, prefix_text, suffix_text, pos_x, pos_y, font_name,
                    font_slant, font_weight, font_size, font_c, font_a, font_angle, num_is, num_chars)
    font_slant:
    CAIRO_FONT_SLANT_NORMAL: Upright font style
    CAIRO_FONT_SLANT_ITALIC: Italic font style
    CAIRO_FONT_SLANT_OBLIQUE: Oblique font style
    font_weight:
    CAIRO_FONT_WEIGHT_NORMAL: Normal font weight
    CAIRO_FONT_WEIGHT_BOLD: Bold font weight
    ]]
    rgb_to_r_g_b.lua
    Code:
    function rgb_to_r_g_b(colour,alpha)
            return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end
    panel.lua
    Code:
    require 'cairo'
    
    package.path = "/home/proxess/.conkygui/scripts/?.lua"
    require 'rgb_to_r_g_b'
    
    function panel(cairo_render, tl_x, tl_y, br_x, br_y, radius_tl, radius_tr, radius_bl, radius_br,
                            gradient_struct, gradline_from_x, gradline_from_y, gradline_to_x, gradline_to_y)
    
            --Towards Top Right
            cairo_move_to(cairo_render, tl_x+radius_tl, tl_y)
            cairo_line_to(cairo_render, br_x-radius_tr, tl_y)
            cairo_curve_to(cairo_render, br_x, tl_y, br_x, tl_y, br_x, tl_y+radius_tr)
    
            -- Towards Bottom Right
            cairo_line_to(cairo_render, br_x, br_y-radius_br)
            cairo_curve_to(cairo_render, br_x, br_y, br_x, br_y, br_x-radius_br, br_y)
    
            -- Towards Bottom Left
            cairo_line_to(cairo_render, tl_x+radius_bl, br_y)
            cairo_curve_to(cairo_render, tl_x, br_y, tl_x, br_y, tl_x, br_y-radius_bl)
    
            -- Towards Top Left
            cairo_line_to(cairo_render, tl_x,tl_y+radius_tl)
            cairo_curve_to(cairo_render, tl_x, tl_y, tl_x, tl_y, tl_x+radius_tl, tl_y)
            cairo_close_path(cairo_render)
    
            -- Paint
            if #(gradient_struct) > 1 then
                    local gradient = cairo_pattern_create_linear(gradline_from_x, gradline_from_y,
                                                                     gradline_to_x, gradline_to_y)
                    for i in pairs(gradient_struct) do
                            gradient_fill(gradient, gradient_struct[i])
                    end
    
                    cairo_set_source(cairo_render, gradient)
            else
                    cairo_set_source_rgba(cairo_render,
                            rgb_to_r_g_b(gradient_struct['grad_c'], gradient_struct['grad_a']))
            end
    
            cairo_fill(cairo_render)
    end
    
    function gradient_fill(gradient, struct)
            cairo_pattern_add_color_stop_rgba(gradient, struct['grad_stop'],
                                    rgb_to_r_g_b(struct['grad_c'], struct['grad_a']))
    end
    text.lua
    Code:
    require 'cairo'
    require 'math'
    
    package.path = "/home/proxess/.conkygui/scripts/?.lua"
    require 'rgb_to_r_g_b'
    
    
    function text(cairo_render,
                            conky_var, conky_arg, prefix_text, suffix_text, pos_x, pos_y, font_name,
                            font_slant, font_weight, font_size, font_c, font_a, font_angle, num_is, num_chars)
    
            -- Ensure Updates
            local conky_updates = tonumber(conky_parse('${updates}'))
            local conky_updates_against = 5
            if conky_updates < conky_updates_against then return end
    
            -- Position
            cairo_move_to(cairo_render, pos_x, pos_y)
    
            -- Font
            cairo_select_font_face(cairo_render, font_name, font_slant, font_weight)
    
            -- Font Size
            cairo_set_font_size(cairo_render, font_size)
    
            -- Font Colour
            cairo_set_source_rgba(cairo_render, rgb_to_r_g_b(font_c, font_a))
    
            -- Matrix Transformation
            -- cairo_translate(cairo_render, 128.0, 128.0)
    
            -- Angle
            cairo_rotate(cairo_render,font_angle)
    
    
    
            -- Show Text
            local fullstring = ''
    
            if conky_var == '' then
                    fullstring = string.format('%s%s', prefix_text, suffix_text)
    
            else
                    fullstring = text_parser(conky_var, conky_arg)
    
                    if num_is then
                            fullstring = numeric_val(fullstring, prefix_text, suffix_text, num_chars)
                    else
                            fullstring = string.format('%s%s%s',
                                    prefix_text, fullstring, suffix_text)
                    end
            end
    
            cairo_show_text(cairo_render, fullstring)
            cairo_stroke(cairo_render)
    end
    
    
    function text_parser(conky_var, conky_arg)
            local conky_return = ''
    
            conky_return = conky_parse(string.format('${%s %s}', conky_var, conky_arg))
    
            return conky_return
    end
    
    function numeric_val(value, prefix_text, suffix_text, num_chars)
            local multiplyer = 1
            local index = 1
    
            value = tonumber(value)
    
            if value < 0 then
                    prefix_text = string.format('%s%s', prefix_text, '-')
                    value = math.abs(val)
            else
                    prefix_text = string.format('%s%s', prefix_text, ' ')
            end
    
            while index <= num_chars do
                    if value < multiplyer and multiplyer > 1 then
                            prefix_text = string.format('%s%s', prefix_text, '0')
                    end
                    multiplyer = multiplyer*10
                    index = index+1
            end
    
            return string.format('%s%s%s', prefix_text, value, suffix_text)
    end
    wave.lua - you still have to modify this to use it, I haven't properly implemented it yet.
    Code:
    require 'cairo'
    require 'os'
    require 'rgb_to_r_g_b'
    
    function wave(cairo_render)
            local w=conky_window.width
            local h=conky_window.height
            local count=os.clock()
            local line1_colour=0x000000
            local line1_alpha=0.5
            local line2_colour=0x888888
            local line2_alpha=0.5
            local line3_colour=0xFFFFFF
            local line3_alpha=0.5
            local pat=cairo_pattern_create_linear(0,0,w,h-60)
    
            cairo_pattern_add_color_stop_rgba(pat,0.0,rgb_to_r_g_b(line1_colour,line1_alpha))
            cairo_pattern_add_color_stop_rgba(pat,0.5,rgb_to_r_g_b(line2_colour,line2_alpha))
            cairo_pattern_add_color_stop_rgba(pat,1.0,rgb_to_r_g_b(line3_colour,line3_alpha))
            cairo_set_source(cairo_render, pat)
            cairo_set_line_width(cairo_render, 1)
    
            cairo_move_to(cairo_render,w/2,0)
            for i = 0,1000 do
                    cairo_line_to(cairo_render, 25+5*math.sin(0.042*i+4.8*count)+5*math.sin(0.038*i+5.2*count)+10*math.sin(0.05*i+4.9*count)+4*math.sin(0.025*i+5.5*count),7*i)
            end
            cairo_move_to(cairo_render,w/2,0)
            for i = 0,1000 do
                    cairo_line_to(cairo_render, 25+4*math.sin(0.028*i+5.5*count)+6*math.sin(0.026*i+4.7*count)+15*math.sin(0.024*i+6.6*count)+8*math.sin(0.013*i+4.1*count),7*i)
            end
            cairo_move_to(cairo_render,w/2,0)
            for i = 0,1000 do
                    cairo_line_to(cairo_render, 25+2*math.sin(0.097*i+6.2*count)+4*math.sin(0.019*i+5.8*count)+6*math.sin(0.076*i+6.5*count)+4*math.sin(0.028*i+6.2*count),7*i)
            end
            cairo_set_line_width(cairo_render,1)
            cairo_stroke(cairo_render)
    end
    Laptop: i7 4800MQ 2.7GHz (~3.7GHz); 2x 4GB Kingston HyperX Genesis 1600MHz; Nvidia 780M 4GB; Crucial M4 256GB SSD; Ubuntu 14.04 LTS x64 and Windows 8.1 x64.
    Ubuntu #8076 / Linux #429448

Page 1192 of 2325 FirstFirst ... 1926921092114211821190119111921193119412021242129216922192 ... 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
  •