Page 1694 of 2348 FirstFirst ... 6941194159416441684169216931694169516961704174417942194 ... LastLast
Results 16,931 to 16,940 of 23480

Thread: Post your .conkyrc files w/ screenshots

  1. #16931
    Join Date
    Aug 2009
    Location
    East of Atlantic
    Beans
    81
    Distro
    Ubuntu

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by akernan View Post
    I figured it out. The conky wireless variables do not work but I modified a bash script I got. The bash script gets the wireless signal info from /proc/net/wireless. I then use the bargraph.lua script with conky exec variable and the bash scripts as arguments. I've attached the bash scripts & lua script. I'm not 100% sure of the max settings in the lua script.
    Hello;

    If conky variables don't work, it's maybe because they return numbers with units. You can get off them using something like
    Code:
    name="",
    arg=conky_parse("${wireless_bitrate}"):gsub(" Mb/s","")
    conky_parse("${wireless_bitrate}") --> 11 Mb/s
    conky_parse("${wireless_bitrate}"):gsub(" Mb/s","") --> 11

    For the max value, you have just to put the maximum expected. I don't know what they can be for Noise & Link as I don't know what they are !

  2. #16932
    Join Date
    Feb 2011
    Beans
    45
    Distro
    Ubuntu Mate

    Re: Post your .conkyrc files w/ screenshots

    I started a new conky and I am having some problems. What I want to do is change the core bargraphs to match the rest. When I made my change on the lua file I get a error

    Conky: llua_do_call: function conky-widget execution failed: attemt to call a nil value

    Can anyone help me figure this out. Here is my lua, thanks



    Code:
    --[[ EQUALIZER WIDGET
        v1.0 by wlourf (10 Feb. 2010)
        This widget draw a simple bar like (old) equalizers on hi-fi systems.
        http://u-scripts.blogspot.com/
        
        The arguments are :
        - "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
        - "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. 
            If you would not use an argument in the Conky variable, use ''.
        - "max" is the maximum value of the bar. If the Conky variable outputs a percentage, use 100.
        - "nb_blocks" is the umber of block to draw
        - "cap" id the cap of a block, possibles values are CAIRO_LINE_CAP_ROUND , CAIRO_LINE_CAP_SQUARE or CAIRO_LINE_CAP_BUTT
          see http://www.cairographics.org/samples/set_line_cap/
        - "xb" and "yb" are the coordinates of the bottom left point of the bar
        - "w" and "h" are the width and the height of a block (without caps)
        - "space" is the space betwwen two blocks, can be null or negative
        - "bgc" and "bga" are background colors and alpha when the block is not LIGHT OFF
        - "fgc" and "fga" are foreground colors and alpha when the block is not LIGHT ON
        - "alc" and "ala" are foreground colors and alpha when the block is not LIGHT ON and ALARM ON
        - "alarm" is the value where blocks LIGHT ON are in a different color (values from 0 to 100)
        - "led_effect" true or false : to show a block with a led effect
        - "led_alpha" alpha of the center of the led (values from 0 to 1)
        - "smooth" true or false : colors in the bar has a smooth effect
        - "mid_color",mid_alpha" : colors of the center of the bar (mid_color can to be set to nil)
        - "rotation" : angle of rotation of the bar (values are 0 to 360 degrees). 0 = vertical bar, 90 = horizontal bar
        
    ]]
    require 'cairo'
    
    function equalizer(cr, xb, yb, name, arg, max, nb_blocks, cap, w, h, space, bgc, bga, fgc, fga,alc,ala,alarm,led_effect,led_alpha,smooth,mid_color,mid_alpha,rotation)
    
    -- recoding function of color
    
         local function rgb_to_r_g_b(colour, alpha)
            return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
        end
    -- data necessary for the type of input divisions Equaliser
    
        local cap_round = CAIRO_LINE_CAP_ROUND        -- in the form of a circle
        local cap_square = CAIRO_LINE_CAP_SQUARE    -- in the form of a rectangle
        local cap_butt = CAIRO_LINE_CAP_BUTT        -- in the form of rectangular (other)
    
        local function setup_equalizer()
    
    -- making data from OS
            
            local str = conky_parse(string.format('${%s %s}', name, arg))
            
            local value = tonumber(str)
            if value == nil then value = 0 end
    
            local pct = 100*value/max
            local pcb = 100/nb_blocks
    -- set the size and type of scale
            cairo_set_line_width (cr, h)
            cairo_set_line_cap  (cr, cap)
    -- Unscrew Equaliser    
            local angle= rotation*math.pi/180
            for pt = 1,nb_blocks do  
                local light_on=false
                --set colors
                local col,alpha = bgc,bga
                if pct>=(100/nb_blocks/2) then --start after an half bloc
                    if pct>=(pcb*(pt-1)) then 
                        light_on=true
                        col,alpha = fgc,fga
                        if pct>=alarm and (pcb*pt)>alarm then col,alpha = alc,ala end
                    end
                end
    
                --vertical points
                local x1=xb
                local y1=yb-pt*(h+space)
                local radius0 = yb-y1
        
                local x2=xb+radius0*math.sin(angle)
                local y2=yb-radius0*math.cos(angle)
                
                --line on angle
                local a1=(y2-yb)/(x2-xb)
                local b1=y2-a1*x2
    
                --line perpendicular to angle
                local a2=-1/a1
                local b2=y2-a2*x2
                
                --dots on perpendicular
                local xx0,xx1,yy0,yy1=0,0,0,0
                if rotation == 90  or rotation == 270 then
                    xx0,xx1=x2,x2
                    yy0=yb
                    yy1=yb+w
                else
                    xx0,xx1=x2,x2+w*math.cos(angle)
                    yy0=xx0*a2+b2
                    yy1=xx1*a2+b2
                end
    
                --perpendicular segment
                cairo_move_to (cr, xx0 ,yy0)
                cairo_line_to (cr, xx1 ,yy1)
            
                --colors
                local xc,yc=(xx0+xx1)/2,(yy0+yy1)/2
                if light_on and led_effect then
                    local pat = cairo_pattern_create_radial (xc, yc, 0, xc,yc,w/1.5)
                    cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col,led_alpha))
                    cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col,alpha))
                    cairo_set_source (cr, pat)
                    cairo_pattern_destroy(pat)
                else
                    cairo_set_source_rgba(cr, rgb_to_r_g_b(col,alpha))
                end 
    
                if light_on and smooth then
                    local radius = (nb_blocks+1)*(h+space)
                    if pt==1 then 
                        xc0,yc0=xc,yc --remember the center of first block
                    end
                    cairo_move_to(cr,xc0,yc0)
                    local pat = cairo_pattern_create_radial (xc0, yc0, 0, xc0,yc0,radius)
                    cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(fgc,fga))
                    cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(alc,ala))
                    if mid_color ~=nil then
                        cairo_pattern_add_color_stop_rgba (pat, 0.5,rgb_to_r_g_b(mid_color,mid_alpha))
                    end
                    cairo_set_source (cr, pat)
                    cairo_pattern_destroy(pat)
                end 
            
                cairo_stroke (cr);
    
            end
        end    
        --prevent segmentatioon error
        local updates=tonumber(conky_parse('${updates}'))
    
            setup_equalizer()
    end
    --[[ END WIDGET ]]
    -- -------------------------------------------------------------------------------------
    --[[ TEXT WIDGET ]]
    
    function text_widget(cr, x, y, prefix, name, arg, suffix, fsize, fgc, fga, rotation)
    
    -- recoding function of color
    
         local function rgb_to_r_g_b(colour, alpha)
            return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
        end
    
    
    
        function addzero100(num)
    
            if tonumber(num) < 10 then
            return "00" .. num
            elseif tonumber(num) <100 then
            return "0" .. num
            else
            return num
            end
        end
    
    -- making data from OS
    
        local str = conky_parse(string.format('${%s %s}', name, arg))
        local value = tonumber(str)
        if value == nil then value = 0 end
    
    -- indicate font size
        cairo_set_font_size (cr, fsize)
    -- indicate the point of departure    
        cairo_move_to(cr, x, y)
    -- indicate the font color
        cairo_set_source_rgba(cr, rgb_to_r_g_b(fgc, fga))
    -- rotate text
        cairo_rotate (cr, rotation*math.pi/180)
    -- display text
        cairo_show_text(cr, prefix .. (addzero100(value)) .. suffix)    
    end
    --[[ END TEXT WIDGET ]]
    
    
    -- -------------------------------------------------------------------------------------
        function conky_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)
    -- -------------------------------------------------------------------------------------
    --[[
    equalizer(cr, xb, yb, name, arg, max, nb_blocks, cap, w, h, space, bgc, bga, fgc, fga,alc,ala,alarm,led_effect,led_alpha,smooth,mid_color,mid_alpha,rotation)
      ]]
    cr = cairo_create(cs)
    --text_widget(cr, 25, 120, "CPU2 ", 'cpu', 'cpu2', " %", 10, 0xffffff, 1, 50)
    -- cpu 
    equalizer(cr, 7, 138, 'cpu', 'cpu0', 100, 100, CAIRO_LINE_CAP_SQUARE, 20, 2, 1, 0x606070, 1, 0x00ff0c, 1, 0xff0000, 1, 80, true, 1, true, 0x66ff00, 1, 90)
    cairo_destroy(cr)
    -- core0
    equilizer(cr, 7, 180, 'core0', 100, 100, CAIRO_LINE_CAP-SQUARE, 20, 2, 1, 0x606070, 1, 0x00ff0c, 1 , 0xff0000, 1 80, true, 1, true, 0x66ff00, 1, 90)
    cairo_destroy(cr)
    -- memory
    cr = cairo_create(cs)
    equalizer(cr, 7, 315, 'memperc', '', 100, 100, CAIRO_LINE_CAP_SQUARE, 5, 2, 1, 0x606070, 1, 0x00ff0c, 1, 0xff0000, 1, 80, true, 1, true, 0xff0000, 1, 90)
    cairo_destroy(cr)
    --swap
    cr = cairo_create(cs)
    equalizer(cr, 7, 341, 'swapperc', '', 100, 100, CAIRO_LINE_CAP_SQUARE, 5, 2, 1, 0x606070, 1, 0x00ff0c, 1, 0xff0000, 1, 80, true, 1, true, 0xff0000, 1, 90)
    cairo_destroy(cr)
    -- hdd Root
    cr = cairo_create(cs)
    equalizer(cr, 7, 400, 'fs_used_perc', '/', 100, 100, CAIRO_LINE_CAP_SQUARE, 5, 2, 1, 0x606070, 1, 0x00ff0c, 1, 0xff0000, 1, 80, true, 1, true, 0x66ff00, 1, 90)
    cairo_destroy(cr)
    --hdd Home
    cr = cairo_create(cs)
    equalizer(cr, 7, 425, 'fs_used_perc', '/home', 100, 100, CAIRO_LINE_CAP_SQUARE, 5, 2, 1, 0x606070, 1, 0x00ff0c, 1, 0xff0000, 1, 80, true, 1, true, 0x66ff00, 1, 90)
    cairo_destroy(cr)
    --hdd Var
    cr = cairo_create(cs)
    equalizer(cr, 7, 450, 'fs_used_perc', '/var', 100, 100, CAIRO_LINE_CAP_SQUARE, 5, 2, 1, 0x606070, 1, 0x00ff0c, 1, 0xff0000, 1, 80, true, 1, true, 0x66ff00, 1, 90)
    cairo_destroy(cr)
    --lan downspeed
    cr = cairo_create(cs)
    equalizer(cr, 7, 569, 'downspeedf', 'eth0', 1350, 100, CAIRO_LINE_CAP_SQUARE, 10, 2, 1, 0x606070, 1, 0x00ff0c, 1, 0xff0000, 1, 80, true, 1, true, 0x66ff00, 1, 90)
    text_widget(cr, 8, 565, "Download  ", 'downspeedf', 'eth0', " Kb/s", 11, 0xffffff, 1, 0)
    cairo_destroy(cr)
    -- lan upspeed
    cr = cairo_create(cs)
    equalizer(cr, 7, 598, 'upspeedf', 'eth0', 170, 100, CAIRO_LINE_CAP_SQUARE, 10, 2, 1, 0x606070, 1, 0x00ff0c, 1, 0xff0000, 1, 80, true, 1, true, 0xff0000, 1, 90)
    text_widget(cr,8 , 594, "Upload ", 'upspeedf', 'eth0', " Kb/s", 11, 0xffffff, 1, 0)
    end
    Code:
    # --- Parameters conky --- #
    own_window         yes
    own_window_class     Conky
    own_window_transparent     yes
    own_window_type     override
    own_window_hints     undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer         yes
    # Minimal Width
    maximum_width         300
    # Minimal Size
    minimum_size         300 800
    # Location of conky --- #
    alignment         bottom_right
    #alignment               middle_middle
    gap_x 10
    gap_y -05
    
    # --- Graphic  --- #
    draw_borders         no
    background         no
    stippled_borders     1
    border_margin         9
    border_width         5
    default_color         white
    draw_graph_borders     yes
    
    # --- Text --- #
    use_spacer         righta
    use_xft         yes
    xftalpha         0.5
    draw_shades         yes
    update_interval     1.5
    draw_outline         no
    draw_borders         no
    font             Sans:size=8:weight=bold
    uppercase         no
    override_utf8_locale     yes
    no_buffers         yes
    cpu_avg_samples     2
    short_units         yes
    pad_percents         2
    text_buffer_size     2048
    
    
    #--- LUA ----
    lua_load ~/scripts/123.lua
    lua_draw_hook_pre widgets
    
    TEXT
    ${font Sans:size=9:weight=bold}${color grey}SYSTEM ${hr 2}$color${font Sans:size=8:weight=bold}
    ${color white}${time %A},${time %e} ${time %B} ${time %G}${alignr}
    ${color grey}Machine$color ${color white}$nodename ${alignr}
    ${color grey}Uptime $color$uptime${alignr}${color grey}Processes:$color $running_processes/$processes
    ${color grey}Kernel$color  ${color white}$kernel ${alignr}
    
    # CPU
    ${font Sans:size=8:weight=bold}${color grey}CPU ${hr 2}$color
    
    ${color white}${font}CPU: ${color red}${cpu cpu0}% $font${color}${alignr}FREQ: ${color red}${freq_g 1}Ghz$alignr ${color white}
    
    
    
    CORE0:
    ${color grey}${cpugraph cpu1 20,300 00ff0c 00ff0c }
    CORE1:
    ${color grey}${cpugraph cpu2 20,300 00ff0c 00ff0c } 
    
    #RAM
    ${font Sans:size=8:weight=bold}${color grey}MEMORY${hr 2}$color${font Sans:size=8:weight=bold}
    
    ${color white}RAM: ${color red}$memperc%${alignr}${color white}USED: ${color red}$mem/$memmax
    
    ${color white}SWAP:$color $swapperc%${alignr}${color white}USED: ${color red}$swap/$swapmax
    
    #HDD
    
    ${voffset -5}${font Sans:size=8:weight=bold}${color grey}HDD ${hr 2}$color${font Sans:size=8:weight=bold}
    
    ${color white}ROOT${color red} ${fs_free_perc /}%$alignr${color}FREE: ${fs_free /}/ ${fs_size /}
    
    ${color white}HOME${color red}  ${fs_free_perc /home}%$alignr${color}FREE: ${fs_free /home}/ ${fs_size /home}
    
    ${color white}VAR${color red}  ${fs_free_perc /var}%$alignr${color}FREE: ${fs_free /var}/ ${fs_size /var}
    
    
    #NETWORK
    ${font Sans:size=9:weight=bold}${color grey}NETWORK ${hr 2}$color${font Sans:size=8:weight=bold}
    
    ${color ff3500}Local:$color${goto 50}${addr eth0}    ${color ff3500}${goto 180}Public:$color${goto 225}${execi 300 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}
    
    #${color white$color ${downspeed eth0}${alignr}${color white}.$color${alignr} ${upspeed eth0}
    #${downspeedgraph eth0 30,115 000000 00ff00} ${alignr}${upspeedgraph eth0 30,115 000000 ff0000}$color
    #Trafic
    
    ${font Sans:size=8:weight=bold}
    ${voffset -26 alignl}${color ff3500}Total Down: ${color white}${totaldown eth0}${color ff3500}${alignr}Total Up:${alignr} ${color white}${totalup eth0}
    
    
    #${color white$color ${downspeed vlan0}${alignr}${color white}.$color${alignr} ${upspeed vlan0}
    #${downspeedgraph vlan0 30,115 000000 00ff00} ${alignr}${upspeedgraph vlan0 30,115 000000 ff0000}$color
    # Trafic
    ${font Sans:size=8:weight=bold}
    ${voffset -26}${alignr}${color 66ff00}Total Down: ${color white}${totaldown vlan0}
    ${voffset 16}${alignr}${color 66ff00}Total Up:${alignr} ${color white}${totalup vlan0}
    Attached Images Attached Images
    Last edited by alpetjr; April 3rd, 2011 at 08:23 PM.

  3. #16933
    Join Date
    Feb 2011
    Beans
    45
    Distro
    Ubuntu Mate

    Re: Post your .conkyrc files w/ screenshots

    When a person makes a post in a window or a border how is it done instead of putting the whole script in the box?

  4. #16934
    Join Date
    Apr 2010
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Post your .conkyrc files w/ screenshots

    I suppose you want something like this?

    Code:
    When a person makes a post in a window 
    or a border how is it done instead of putting the whole script in the box?
    Try:
    1. Paste the text in the message window
    2. Select the text you'd like inside the box
    3. Select the Icon '#'
    Last edited by Dondermans; April 3rd, 2011 at 03:49 PM.

  5. #16935
    Join Date
    Feb 2009
    Beans
    122

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by akernan View Post
    I figured it out. The conky wireless variables do not work but I modified a bash script I got. The bash script gets the wireless signal info from iwconfig. I then use the bargraph.lua script with conky exec variable and the bash scripts as arguments. I've attached the bash scripts & lua script. I'm not 100% sure of the max settings in the lua script.
    Here's the updated scripts. I made them more generic so they work on any wireless interface, I think. I have eth1 but some have wlan0. I changed the max in bargraph.lua, but I'm not 100% sure noise/signal max is correct.
    Attached Files Attached Files

  6. #16936
    Join Date
    Feb 2009
    Beans
    122

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by wlourf View Post
    Hello;

    If conky variables don't work, it's maybe because they return numbers with units. You can get off them using something like
    Code:
    name="",
    arg=conky_parse("${wireless_bitrate}"):gsub(" Mb/s","")
    conky_parse("${wireless_bitrate}") --> 11 Mb/s
    conky_parse("${wireless_bitrate}"):gsub(" Mb/s","") --> 11

    For the max value, you have just to put the maximum expected. I don't know what they can be for Noise & Link as I don't know what they are !

    I tried the above change and I get conky_main_bars execution failed error. The lua script works with it not in.

  7. #16937
    Join Date
    Aug 2009
    Location
    East of Atlantic
    Beans
    81
    Distro
    Ubuntu

    Re: Post your .conkyrc files w/ screenshots

    @akernan, there is an updated version of the bargraph script : http://wlourf.deviantart.com/gallery/28062900#/d2jj1rz (If you use it, just copy the bars_settings into the new script).

    For the gsub() function, no idea what's wrong

  8. #16938
    Join Date
    Apr 2007
    Beans
    195

    Re: April 2011 Data Dump

    Quote Originally Posted by DanPir View Post
    Where can I find the required fonts and how to install them?
    @VinDSL SEE??? More proof you should post them somewhere! (Messin' with ya man, I know.)

    Google is your answer DanPir. I find many of them are at dafont.com, however, a google search for them will always come up with the source. Especially if you include the maker or provider in the search (VinDSL has the maker/owner/provider listed in brackets next to each font in the script.)

    After that, It gets fun!
    First: Some prep work. Go to your home directory and create a folder called .fonts and you may need to reveal hidden files in the file manager to do it. I don't know what file manager you have, so I can't tell you specifics. Now, go to a command prompt and edit the file .bash_aliases in your favourite text editor. This file is already located in your home directory, or should be. If not, you'll be making it anyways.

    Add this line to the file.

    Code:
    alias fontreload='fc-cache -f -v'
    Now log out and log back in. I'll get to why in a minute.

    Download the fonts to a directory somewhere you usually download stuff to. They'll be in some sort of zip format, so it's best to download them somewhere temporary. Unzip them to the .fonts directory you made in your home directory. Then go back to a a command prompt and type "fontreload" without the quotes. This will install all your new fonts so you can use them.

    Easy huh? Oh, and for the Conky Weather fonts, you don't need to do this. When you install kaivalagi's conkyForecast script, it already installs them all.

    While I'm here, have a look at these! They're helpful when you're just getting started in Conky. Get yourself screenruler from the repositories, and visit these links! VERY handy.

    Conky Configuration Variables (Above the TEXT section.)
    Conky Objects (Below the TEXT section.)
    Conky Pitstop (Source for how-to-use scripts.)
    kaivalagi's weather script.
    kaivalagi's misc scripts.
    Other kaivalagi python scripts for use with Conky.

    Welcome to the insanitarium, my friend!

  9. #16939
    Join Date
    Feb 2009
    Beans
    122

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by wlourf View Post
    @akernan, there is an updated version of the bargraph script : http://wlourf.deviantart.com/gallery/28062900#/d2jj1rz (If you use it, just copy the bars_settings into the new script).

    For the gsub() function, no idea what's wrong
    Getting the new script worked, I also pulled a dummy by putting everything in quotes. It runs with no errors but nothing is displayed. I see the bar but that's it. I've tried changing the max but that didn't help.

  10. #16940
    Join Date
    Aug 2009
    Location
    East of Atlantic
    Beans
    81
    Distro
    Ubuntu

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by akernan View Post
    Getting the new script worked, I also pulled a dummy by putting everything in quotes. It runs with no errors but nothing is displayed. I see the bar but that's it. I've tried changing the max but that didn't help.
    You should post the whole script, I don't understand what you putted in quotes !

Page 1694 of 2348 FirstFirst ... 6941194159416441684169216931694169516961704174417942194 ... 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
  •