Page 2048 of 2328 FirstFirst ... 1048154819481998203820462047204820492050205820982148 ... LastLast
Results 20,471 to 20,480 of 23276

Thread: Post your .conkyrc files w/ screenshots

  1. #20471
    Join Date
    Jul 2012
    Location
    Oklahoma, USA
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by scottr99 View Post
    I hear you, and thanks. This is a compilation of various Python scripts, so dumping them all in here all at once would be a bit overwhelming I think. I'd prefer to address a specific thing at a time. If you have something specific you like let me know and I'll post on that.
    Ok, I'd like to know how to get the Drudge Report on conky? I like that.

  2. #20472
    Join Date
    May 2012
    Beans
    33

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Petro Dawg View Post
    Ok, I'd like to know how to get the Drudge Report on conky? I like that.
    That one's pretty straightforward:

    headlineget.py
    Code:
    #!/usr/bin/env python
    import nltk
    import re
    import sys
    import csv
    import time
    from time import sleep, localtime, strftime
    from urllib import urlopen
    
    while True:
    
        file1 = open('/home/scott/drudge.txt', 'w')
        url = "http://www.drudgereport.com/"    
        html = urlopen(url).read()    
        raw = nltk.clean_html(html)  
        processedString = re.sub("\n\s*\n*", "\n", raw)
        print >>file1, processedString
    
        sleep(120)
    
        file3 = open('/home/scott/drudge.txt', 'rb')
        data = csv.reader(file3)
        table = [column for column in data]
    
        for x in range(0,30):
            if table[x][0] == 'AP WORLD ':
                break
            else:
                aa = table[x][0]
        file2 = open('/home/scott/drudgeout.out', 'w')
        print >>file2, 'DRUDGE REPORT: ' + strftime("%m/%d/%Y - %H:%M:%S", localtime())
        bb = x
        for x in range(1,bb):
            print >>file2, table[x][0].strip('')
        
        time.sleep(30)
    Then in .conkyrc use:

    ${goto 10}${color red}${exec cat 30 /home/scott/drudgeout.out}$color

  3. #20473
    Join Date
    May 2012
    Beans
    33

    Re: Post your .conkyrc files w/ screenshots

    I should add that the sleep times may not make sense, just adjust them as you see fit. I have them set as they are for debugging purposes and need to be updated. I'm no expert programmer and I don't have a whole lot of time so I do what I can when I can.

  4. #20474
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Petro Dawg View Post
    I told you I would let you know what worked....



    I made the changes and logged into unity and the flash while clicking problem seems to be fixed now. Thanks.

    I did notice something else. The RAM memory bar indication is about 15% higher than my system resource monitor output. Any idea why conky is so much higher than system monitor?
    Good, glad to hear that.

    maybe this for RAM:
    Code:
    no_buffers no
    to
    Code:
    no_buffers yes
    I logged into my Xfce4 session and ran your conky:

    Hey, that's my log-in screen behind your conky ... easy fix I add, above TEXT:
    Code:
    ### ARGB can be used for real transparency
    ### NOTE that a composite manager is required for real transparency.
    ### This option will not work as desired (in most cases) in conjunction with
    ### own_window_type normal
     own_window_argb_visual yes
    
    ### When ARGB visuals are enabled, this use this to modify the alpha value
    ### Use: own_window_type normal
    ### Use: own_window_transparent no
    ### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
    # own_window_argb_value 0
    and the results are in:

    Yea, that's better, now for some 'sun block', again somewhere above TEXT and one line below TEXT:
    Code:
    ###  LUA Settings  ###########################################################
    ## Above and After TEXT - requires a composite manager or blinks.
    ##
    # lua_load ~/Conky/LUA/draw-bg.lua
    #TEXT
    # ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.3}
    #
    ## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
    ##
    ## OR Both above TEXT (No composite manager required - no blinking!)
    #
    #--------------------------------
    lua_load ~/Conky/LUA/draw-bg.lua
    # lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.3
    # lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01
    #
    # TEXT
    ##
    #
    #######################################################  End LUA Settings  ###
    TEXT
    ${lua conky_draw_bg 15 0 0 0 0 0x000000 0.3}
    # TEXT code block 1: START
    ... and we're in the shade folks - no sunburn!


    draw-bk.lua
    Code:
    --[[Background originally by londonali1010 (2009)
        ability to set any size for background mrpeachy 2011
        ability to set variables for bg in conkyrc dk75
    
      the change is that if you set width and/or height to 0
      then it assumes the width and/or height of the conky window
    
    so:
    
    Above and After TEXT  (requires a composite manager or it blinks!)
    
     lua_load ~/wea_conky/draw_bg.lua
     TEXT
     ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}
    
    OR Both above TEXT (no composite manager required - no blinking!)
    
     lua_load ~/wea_conky/draw_bg.lua
     lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
     TEXT
    
    Note
    ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
      See below:        1  2 3 4 5 6        7
    
    ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
    
    covers the whole window and will change if you change the minimum_size setting
    
    1 = 20             corner_radius
    2 = 0             x_position
    3 = 0             y_position
    3 = 0             width
    5 = 0             height
    6 = 0x000000      color
    7 = 0.4           alpha
    
    ######### calendar function ##################################################
    
    then to use it, you activate the calendar function BELOW TEXT like this
    
    ${lua luacal {settings}}
    
    #${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
    #    x=x position top left
    #    y=y position top left
    #    tf=title font, eg "mono" must be in quotes
    #    tfs=title font size
    #    tc=title color
    #    ta=title alpha
    #    bf=body font, eg "mono" must be in quotes
    #    bfs=body font size
    #    bc=body color
    #    ba=body alpha
    #    hf=highlight font, eg "mono" must be in quotes
    #    hfs=highlight font size
    #    hc=highlight color
    #    ha=highlight alpha
    #    sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts
    
    #    gt=gap from title to body
    #    gh=gap horizontal between columns
    #    gv=gap vertical between rows
    #    sd=start day, 0=Sun, 1=Mon
    
    #    hstyle = heading style, 0=just days, 1=date insert
    #    tdf=title date font, eg "mono" must be in quotes
    #    tdfs=title date font size
    #    tdc=title date color
    #    tda=title date alpha
    
    # test line
    -- ${lua luacal {x=10,y=100,tf="Purisa",tfs=24,tc=0xf67e16,ta=1,bf="First Order",bfs=26,bc=0xecd32a,ba=1,hf="Purisa",hfs=18,hc=0xf67e16,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="First Order",tdfs=28,tdc=0xff0000,tda=1}}
    
    
    ]]
    
    require 'cairo'
    local    cs, cr = nil
    function rgb_to_r_g_b(colour,alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end
    function conky_draw_bg(r,x,y,w,h,color,alpha)
    if conky_window == nil then return end
    if cs == nil then cairo_surface_destroy(cs) end
    if cr == nil then cairo_destroy(cr) end
    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    local cr = cairo_create(cs)
    w=w
    h=h
    if w=="0" then w=tonumber(conky_window.width) end
    if h=="0" then h=tonumber(conky_window.height) end
    cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
    --top left mid circle
    local xtl=x+r
    local ytl=y+r
    --top right mid circle
    local xtr=(x+r)+((w)-(2*r))
    local ytr=y+r
    --bottom right mid circle
    local xbr=(x+r)+((w)-(2*r))
    local ybr=(y+r)+((h)-(2*r))
    --bottom right mid circle
    local xbl=(x+r)
    local ybl=(y+r)+((h)-(2*r))
    -----------------------------
    cairo_move_to (cr,xtl,ytl-r)
    cairo_line_to (cr,xtr,ytr-r)
    cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
    cairo_line_to (cr,xbr+r,ybr)
    cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
    cairo_line_to (cr,xbl,ybl+r)
    cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
    cairo_line_to (cr,xtl-r,ytl)
    cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
    cairo_close_path(cr)
    cairo_fill (cr)
    ------------------------------------------------------------
    cairo_surface_destroy(cs)
    cairo_destroy(cr)
    return ""
    end
    -- ###### calendar function ##################################################
    function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
    if conky_window == nil then return end
    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    local cr = cairo_create(cs)
    --############################################################################
    if caltab.x==nil then
    caltab=loadstring("return" .. caltab)()
    end
    local cal_x=caltab.x
    local cal_y=caltab.y
    local tfont=caltab.tf        or "mono"
    local tfontsize=caltab.tfs    or 12
    local tc=caltab.tc        or 0xffffff
    local ta=caltab.ta        or 1
    local bfont=caltab.bf        or "mono"
    local bfontsize=caltab.bfs    or 12
    local bc=caltab.bc        or 0xffffff
    local ba=caltab.ba        or 1
    local hfont=caltab.hf        or "mono"
    local hfontsize=caltab.hfs    or 12
    local hc=caltab.hc        or 0xff0000
    local ha=caltab.ha        or 1
    local spacer=caltab.sp        or " "
    local gaph=caltab.gh        or 20
    local gapt=caltab.gt        or 15
    local gapl=caltab.gv        or 15
    local sday=caltab.sd        or 0
    local hstyle=caltab.hstyle    or 0
    --convert colors
    --local font=string.gsub(font,"_"," ")
    local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
    --main body text color
    local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
    --highlight text color
    local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
    --############################################################################
    --calendar calcs
    local year=os.date("%G")
    local today=tonumber(os.date("%d"))
    local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
    local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
    local feb=(os.difftime(t1,t2))/(24*60*60)
    local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
    local day=tonumber(os.date("%w"))+1-sday
    local day_num = today
    local remainder=day_num % 7
    local start_day=day-(day_num % 7)
    if start_day<0 then start_day=7+start_day end
    local month=os.date("%m")
    local mdays=monthdays[tonumber(month)]
    local x=mdays+start_day
    local dnum={}
    local dnumh={}
    if mdays+start_day<36 then
    dlen=35
    plen=29
    else
    dlen=42
    plen=36
    end
    for i=1,dlen do
        if i<=start_day then
        dnum[i]="  "
        else
        dn=i-start_day
            if dn=="nil" then dn=0 end
            if dn<=9 then dn=(spacer .. dn) end
            if i>x then dn="" end
            dnum[i]=dn
            dnumh[i]=dn
            if dn==(spacer .. today) or dn==today then
            dnum[i]=""
            end
            if dn==(spacer .. today) or dn==today then
            dnumh[i]=dn
            place=i
            else dnumh[i]="  "
            end
        end
    end--for
    cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tfontsize);
    cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
    local extents=cairo_text_extents_t:create()
    tolua.takeownership(extents)
    if hstyle==0 then
        if tonumber(sday)==0 then
        dys={"SU","MO","TU","WE","TH","FR","SA"}
        else
        dys={"MO","TU","WE","TH","FR","SA","SU"}
        end
        --draw calendar titles
    elseif hstyle==1 then
        if tonumber(sday)==0 then
        dys={"SU","MO"," ","  ","  ","FR","SA"}
        cairo_text_extents(cr,"MO",extents)
        local s=extents.x_advance+gaph
        local f=gaph*5
        local tdfont=caltab.tdf        or "mono"
        local tdfontsize=caltab.tdfs    or 12
        local tdc=caltab.tdc        or 0xffffff
        local tda=caltab.tda        or 1
        cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
        cairo_set_font_size (cr, tdfontsize);
        local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
        cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
        local insert=os.date("%b %y")
        cairo_text_extents(cr,insert,extents)
        local w=extents.x_advance
        cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
        cairo_show_text (cr,insert)
        cairo_stroke (cr)
        else
        dys={"MO","TU"," ","  ","  ","SA","SU"}
        cairo_text_extents(cr,"TU",extents)
        local s=extents.x_advance+gaph
        local f=gaph*5
        local tdfont=caltab.tdf        or "mono"
        local tdfontsize=caltab.tdfs    or 12
        local tdc=caltab.tdc        or 0xffffff
        local tda=caltab.tda        or 1
        cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
        cairo_set_font_size (cr, tdfontsize);
        local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
        cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
        local insert=os.date("%b %y")
        cairo_text_extents(cr,insert,extents)
        local w=extents.x_advance
        cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
        cairo_show_text (cr,insert)
        cairo_stroke (cr)
        end
    end
    --draw calendar titles
    for i=1,7 do
    cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tfontsize);
    cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
    cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
    cairo_show_text (cr, dys[i])
    cairo_stroke (cr)
    end
    --draw calendar body
    cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, bfontsize);
    cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
    for i=1,plen,7 do
    local fn=i
        for i=fn,fn+6 do
        cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
        cairo_show_text (cr, dnum[i])
        cairo_stroke (cr)
        end
    end
    --highlight
    cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, hfontsize);
    cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
    for i=1,plen,7 do
    local fn=i
        for i=fn,fn+6 do
        cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
        cairo_show_text (cr, dnumh[i])
        cairo_stroke (cr)
        end
    end
    --############################################################################
    caltab=nil
    dlen=nil
    plen=nil
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    return ""
    end-- end main function#######################################################
    and then back in OpenBox with a light background running xcompmgr (composite manager)

    Neat huh!

    NOW - tomorrow I redo the "cut" figures here to get those working as planned.

    What type of engineer?

  5. #20475
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by scottr99 View Post
    I hear you, and thanks. This is a compilation of various Python scripts, so dumping them all in here all at once would be a bit overwhelming I think. I'd prefer to address a specific thing at a time. If you have something specific you like let me know and I'll post on that.
    What are you using for weather? I'm always interested in weather scripts.

  6. #20476
    Join Date
    Jul 2012
    Location
    Oklahoma, USA
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    Good, glad to hear that.

    maybe this for RAM:
    Code:
    no_buffers no
    to
    Code:
    no_buffers yes

    What type of engineer?
    Once again correct with your diagnosis. The RAM output is now fixed. Thanks

    I'm studying petroleum engineering (as my avatar/screen name suggests), however I currently work as an engineering intern for a mechanical engineering company to pay the bills.

  7. #20477
    Join Date
    May 2012
    Beans
    33

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    What are you using for weather? I'm always interested in weather scripts.
    weather2.py

    Code:
    #!/usr/bin/env python
    import nltk
    import re
    import sys
    import csv
    import time
    from time import sleep, localtime, strftime
    from urllib import urlopen
    
    while True:
    
        file1 = open('/home/scott/weatherout.txt', 'w')
        url = "http://www.weather.com/weather/today/USNC0121"    
        html = urlopen(url).read()    
        raw = nltk.clean_html(html)  
        processedString = re.sub("\n\s*\n*", "\n", raw)
        print >>file1, processedString
    
        sleep(70)
        
        file2 = open('winfo.txt', 'w')
        file3 = open('/home/scott/weatherout.txt', 'rb')
        data = csv.reader(file3)
        table = [column for column in data]
        
        # 1
        for x in range(0,150):
            if table[x][0] == 'Moonphase: ':
                break
            else:
                aa = table[x][0]
        print >>file2, 'Charlotte, NC: ' + strftime("%m/%d/%Y - %H:%M:%S", localtime())
        d1 = x
        print >>file2, table[d1][0].strip('') + table[d1+1][0].strip('')
        
        # 2
        for x in range(0,150):
            if table[x][0] == 'Moonrise: ':
                break
            else:
                aa = table[x][0]
        d2 = x
        print >>file2, table[d2][0].strip('') + table[d2+1][0].strip('')
        
        # 3
        for x in range(0,150):
            if table[x][0] == 'Sunset: ':
                break
            else:
                aa = table[x][0]
        d3 = x
        print >>file2, table[d3][0].strip('') + table[d3+1][0].strip('')
    
        # 4
        for x in range(0,150):
            if table[x][0] == 'Humidity: ':
                break
            else:
                aa = table[x][0]
        d4 = x
        print >>file2, table[d4][0].strip('') + table[d4+1][0].strip('')
    
        # 5
        #for x in range(0,150):
        #    if table[x][0] == 'Chance of Precip: ':
        #        break
        #    else:
        #        aa = table[x][0]
        #d5 = x
        #print >>file2, table[d5][0].strip('') + table[d5+1][0].strip('')
    
        # 6
        for x in range(0,150):
            if table[x][0] == 'Wind: ':
                break
            else:
                aa = table[x][0]
        d6 = x
        print >>file2, table[d6][0].strip('') + table[d6+1][0].strip('')
        
        print >>file2, 'Summary: ' + table[d1+6][0].strip('')
        
        time.sleep(30)
    In .conkyrc:

    ${goto 10}${color red}${exec cat 30 /home/scott/winfo.txt}$color

  8. #20478
    Join Date
    May 2012
    Beans
    33

    Re: Post your .conkyrc files w/ screenshots

    The weather images on the right are from other scripts. The one on the top is the evening forecast and the one in the middle is the daytime forecast. I can post those too if you're interested.

  9. #20479
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Petro Dawg View Post
    Once again correct with your diagnosis. The RAM output is now fixed. Thanks

    I'm studying petroleum engineering (as my avatar/screen name suggests), however I currently work as an engineering intern for a mechanical engineering company to pay the bills.
    Glad to help again.

    Oh OK, my old eyes can't read the sign the 'dawg' is holding but the Perto makes sense.

    Yes, bills must be paid or no internet!

  10. #20480
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by scottr99 View Post
    The weather images on the right are from other scripts. The one on the top is the evening forecast and the one in the middle is the daytime forecast. I can post those too if you're interested.
    Yes please ... are these your work or from others?
    Tomorrow I look at the one you posted. Thank you.

Page 2048 of 2328 FirstFirst ... 1048154819481998203820462047204820492050205820982148 ... 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
  •