Page 2338 of 2348 FirstFirst ... 1338183822382288232823362337233823392340 ... LastLast
Results 23,371 to 23,380 of 23480

Thread: Post your .conkyrc files w/ screenshots

  1. #23371
    Join Date
    Dec 2011
    Location
    Atlanta, Georgia USA
    Beans
    45
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by alpetjr View Post
    No, I didn't change it, still the same. maybe I'll goof around with it later if I get a chance.
    That line is right after the variables, at the very beginning of the script. Let me know if that works or not.
    Ubuntu User #35429 | Linux User #558865

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

    Re: Post your .conkyrc files w/ screenshots

    sytlintle,I was looking thru the Lua this morning. since I am not realy sure I want the clock I am going to start by taking that out. Do I need stars,rectangle,and rings at the end of the Lua? Right this second, I am concerning myself with the bars. Then go on from there. I guess I need to start somewhere.
    Last edited by alpetjr; March 7th, 2018 at 03:29 PM.

  3. #23373
    Join Date
    Dec 2011
    Location
    Atlanta, Georgia USA
    Beans
    45
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Post your .conkyrc files w/ screenshots

    If you are talking about the ringout fonction, that function is also used in the signal meter. If you're not sure if one of the functions is being used you can search for the function name i.e. 'ringout' in your text editor to find wherever that function is called.

    Also, if you delete or comment out the function and it is being called, you will get an error saying it's trying to call a nil value.
    Last edited by stylintile; March 7th, 2018 at 04:57 PM.
    Ubuntu User #35429 | Linux User #558865

  4. #23374
    Join Date
    Feb 2011
    Beans
    45
    Distro
    Ubuntu Mate

    Re: Post your .conkyrc files w/ screenshots

    [IMG][/IMG]
    sylintile,Well, so far so good. Have alot more work to do. The HD don't want to cooperate.I'm having a hard time figuring out.
    Code:
    require 'cairo'
    require 'imlib2'
    timer30start=1
    songtimerstart=1
    timer5start=1
    function conky_main()
         if conky_window == nil then return end
       local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
        cr = cairo_create(cs)
       local updates=tonumber(conky_parse('${updates}'))
    if updates>5 then
    
    --======================================================================================================================================================
    --                                                    ---DISPLAY AREA---
    --======================================================================================================================================================
    
    desktop=tonumber(conky_parse("${desktop}"))
    
    lcs=CAIRO_LINE_CAP_SQUARE
    lcr=CAIRO_LINE_CAP_ROUND
    lcb=CAIRO_LINE_CAP_BUTT
    bold=CAIRO_FONT_WEIGHT_BOLD
    normal=CAIRO_FONT_WEIGHT_NORMAL
    
    white=0xffffff
    yellow=0xffd700
    red=0xff0000
    green=0x00ff00
    blue=0x0000ff
    bluegrey=0x75b3d1
    olive=0x465c69
    black=0x000000
    dkolive=0x1b2d39
    silver=0xd2d2d2
    brown=0x2e2e2e
    ltblue2=0x00ffff
    bronze=0x665d1e
    flagred=0x570404
    flagblue=0x01049
    ltblue=0x61c9ff
    dkblue=0x0d07fb
    
    --############################            variables              ###############################
    
    timer30=updates % 300
    if timer30==0 or timer30start==1 then
    
    --############################            system              ###############################
    
        processor="Intel® Core™ i3-2370 2.40 GHz"
        mobo1=os.capture("dmidecode -t 2 | grep -m 1 Manufacturer | cut -d: -f2")
        mobo2=os.capture("dmidecode -t 2 | grep -m 1 Product | cut -d: -f2")
        mobo=mobo1.." "..mobo2
        fsys_total=tonumber(os.capture("df -H | grep -m 1 [a-z]6 | cut -c17-19"))
        fsys_free=tonumber(os.capture("df -H | grep -m 1 [a-z]6 | cut -c27-31"))
        fsys_used=tonumber(os.capture("df -H | grep -m 1 [a-z]6 | cut -c23-25"))
        fsys_perc=tonumber(os.capture("df -H | grep -m 1 [a-z]6 | cut -c33- | rev | cut -c4- | rev"))
    
        home_total=tonumber(os.capture("df -H | grep -m 1 home | cut -c17-19"))
        home_free=tonumber(os.capture("df -H | grep -m 1 home | cut -c27-31"))
        home_used=tonumber(os.capture("df -H | grep -m 1 home | cut -c23-25"))
        home_perc=tonumber(os.capture("df -H | grep -m 1 home | cut -c33- | rev | cut -c8- | rev"))
    
    --    newvolume_total=tonumber(os.capture("df -H | grep -m 1 New_Volume | cut -c17-19"))
    --if newvolume_total==nil then newvolume_total=0 end
    
    --    newvolume_free=tonumber(os.capture("df -H | grep -m 1 New_Volume | cut -c27-31"))
    --if newvolume_free==nil then newvolume_free=0 end
    
    --    newvolume_used=tonumber(os.capture("df -H | grep -m 1 New_Volume | cut -c23-25"))
    --if newvolume_used==nil then newvolume_used=0 end
    
    --    newvolume_perc=tonumber(os.capture("df -H | grep -m 1 /New_Volume | cut -c33- | rev | cut -c26- | rev"))
    --if newvolume_perc==nil then newvolume_perc=0 end
    
        total_perc=tonumber(os.capture("df -H --total | grep total | rev | cut -d' ' -f2 | cut -c2- | rev"))
        total_size=tonumber(os.capture("df -H --total | grep total | rev | cut -d' ' -f9- | cut -c2- | rev | cut -d' ' -f2-"))
        total_used=tonumber(os.capture("df -H --total | grep total | rev | cut -d' ' -f6- | cut -c2-6 | rev"))
        total_free=tonumber(os.capture("df -H --total | grep total | rev | cut -d' ' -f4 | cut -c2- | rev"))
    disk_size=tonumber(os.capture("hdparm -I /dev/sda | grep -m3 size | tail -n1 | cut -d'(' -f2 | cut -d' ' -f1"))
    --    disk_free=total_free-newvolume_free
    --    disk_used=total_used-newvolume_used
    
    --    disk_total=total_size-newvolume_total
    --    disk_perca=(disk_used/disk_size)*100
    --    disk_perc=math.floor(disk_perca)
    end--if timer30
    timer30start=nil
    
    timer5=updates % 3
    if timer5==0 or timer5start==1 then
        uptime=conky_parse('${uptime}')
        cpu=tonumber(conky_parse('${cpu cpu0}'))
        cpu1=tonumber(conky_parse('${cpu cpu1}'))
        cpu2=tonumber(conky_parse('${cpu cpu2}'))
        cpu3=tonumber(conky_parse('${cpu cpu3}'))
        cputemp=tonumber(os.capture("sensors | grep -m 1 'Package id' | cut -c17-20"))
        core0temp=tonumber(os.capture("sensors | grep -m 1 'Core 0' | cut -c17-20"))
        core1temp=tonumber(os.capture("sensors | grep -m 1 'Core 1' | cut -c17-20"))
        core2temp=tonumber(os.capture("sensors | grep -m 1 'Core 2' | cut -c17-20"))
        core3temp=tonumber(os.capture("sensors | grep -m 1 'Core 3' | cut -c17-20"))
        cpuspeed=tonumber(conky_parse('${freq_g cpu0}'))
        cpu1speed=tonumber(conky_parse('${freq_g cpu1}'))
        cpu2speed=tonumber(conky_parse('${freq_g cpu2}'))
        cpu3speed=tonumber(conky_parse('${freq_g cpu3}'))
        cpuspeed2=conky_parse('${freq_g cpu0}')
        cpu1speed2=conky_parse('${freq_g cpu1}')
        cpu2speed2=conky_parse('${freq_g cpu2}')
        cpu3speed2=conky_parse('${freq_g cpu3}')
        device=os.capture("df -h | grep -o '/dev/[a-z][a-z][a-z]6'")
        hddtemp=tonumber(os.capture("hddtemp /dev/sda | cut -d' ' --fields=4 | cut -c1-2"))
        load1=tonumber(conky_parse('${loadavg 1}'))
        load2=tonumber(conky_parse('${loadavg 2}'))
        load3=tonumber(conky_parse('${loadavg 3}'))
        load1a=conky_parse('${loadavg 1}')
        load2a=conky_parse('${loadavg 2}')
        load3a=conky_parse('${loadavg 3}')
        swap=conky_parse("${swapmax}")
        swapperc=tonumber(conky_parse("${swapperc}"))
        mem=conky_parse("${memmax}")
        memperc=tonumber(conky_parse("${memperc}"))
        uplan3=tonumber(conky_parse('${upspeedf wlp2s0}'))
    uplan=round((((math.floor(uplan3))*.01)*0.8),2)
        downlan3=tonumber(conky_parse('${downspeedf wlp2s0}'))
    downlan=round((((math.floor(downlan3))*.01)*0.8),2)
    
    end--if timer5
    timer5start=nil
    
    --############################            display area              ###############################
    
    if desktop==1 then
    
    --############################            background              ###############################
    
        rndrect({tlx=40,tly=30,c1=bluegrey,a1=0.035,c2=bluegrey,a2=1,lw=4,width=350,height=800,radius=20,border=""})
    
    --############################            system              ###############################
    
    --#################################################           CPU %
    
    xpos=55
    ypos=80
    
        out({c=yellow,a=1,f="Anonymous Pro:bold",fs=12,x=xpos,y=ypos-30,txt="CPU %:"})
    
    labeltable={"CPU","Core1","Core2","Core3","Core4"}
    cputable={cpu,cpu1,cpu2,cpu3,cpu4}
    reps=#cputable
    
    for i=1,reps do 
    
    start=xpos+50
    finish=start+200
    ypos1=(ypos-10)+((i-1)*20)
    endx=start+(cputable[i]*2)
        bmeter({c=bluegrey,wid=5,tx=start,ty=ypos1,lcap="round",ht=5,max=100,length=200,spacing=4,comd=cputable[i]})
        out({c=white,a=1,f="FreeMono",fs=12,fw=bold,x=start+210,y=ypos1+5,txt=cputable[i].."%"}) 
        out({c=white,a=1,f="FreeMono:Bold",fs=10,x=start-50,y=ypos1+5,txt=labeltable[i]}) 
    
    end--for
    
    --#################################################           CPU Temperature
    
    ypos=210
    
        out({c=yellow,a=1,f="Anonymous Pro:bold",fs=12,x=xpos,y=ypos-30,txt="CPU Temperature:"})
    
    
    temptable={cputemp,core0temp,core1temp,core2temp,core3temp,core4temp}
    labeltable={"CPU","Core1","Core2","Core3","Core4"}
    reps=#temptable
    
    for i=1,reps do 
    
    start=xpos+50
    finish=start+200
    ypos1=(ypos-10)+((i-1)*20)
    endx=start+(temptable[i]*2)
        bmeter({c=bluegrey,wid=5,tx=start,ty=ypos1,lcap="round",ht=5,max=100,length=200,spacing=4,comd=temptable[i]})
        out({c=white,a=1,f="FreeMono",fs=12,fw=bold,x=start+210,y=ypos1+5,txt=temptable[i].."° C"}) 
        out({c=white,a=1,f="FreeMono:Bold",fs=10,x=start-50,y=ypos1+5,txt=labeltable[i]}) 
    
    end--for
    
    --#################################################           CPU Frequency
    
    ypos=340
    
        out({c=yellow,a=1,f="Anonymous Pro:bold",fs=12,x=xpos,y=ypos-30,txt="CPU Frequency:"})
    
    speedtable={cpuspeed,cpu1speed,cpu2speed,cpu3speed,cpu4speed}
    numbtable={cpuspeed2,cpu1speed2,cpu2speed2,cpu3speed2,cpu4speed2}
    labeltable={"CPU","Core1","Core2","Core3"}
    reps=#speedtable
    
    for i=1,reps do 
    
    start=xpos+50
    finish=start+200
    ypos1=(ypos-10)+((i-1)*20)
    endx=start+(speedtable[i]*50)
        bmeter({c=bluegrey,wid=5,tx=start,ty=ypos1,lcap="round",ht=5,max=4,length=200,spacing=4,comd=speedtable[i]})
        out({c=white,a=1,f="FreeMono",fs=12,fw=bold,x=start+210,y=ypos1+5,txt=numbtable[i].." GHz"}) 
        out({c=white,a=1,f="FreeMono:Bold",fs=10,x=start-50,y=ypos1+5,txt=labeltable[i]}) 
    
    end--for
    
    --#################################################           HDD Temperature
    
    ypos=470
    
        out({c=yellow,a=1,f="Anonymous Pro:bold",fs=12,x=xpos,y=ypos-30,txt="HDD Temperature:"})
    start=xpos+50
    finish=start+200
    endx=start+(hddtemp)
    ypos1=(ypos-10)
        bmeter({c=bluegrey,wid=5,tx=start,ty=ypos1,lcap="round",ht=5,max=100,length=200,spacing=4,comd=hddtemp})
        out({c=white,a=1,f="FreeMono",fs=12,fw=bold,x=start+210,y=ypos1+5,txt=hddtemp.."° C"}) 
        out({c=white,a=1,f="FreeMono:Bold",fs=10,x=start-50,y=ypos1+5,txt="Disk"}) 
    
    --#################################################           Load Average
    
    ypos=520
    
        out({c=yellow,a=1,f="Anonymous Pro:bold",fs=12,x=xpos,y=ypos-30,txt="Load Average:"})
    
    loadtable={load1,load2,load3}
    loadnumtable={load1a,load2a,load3a}
    labeltable={"Load 1","Load 2","Load 3"}
    reps=#loadtable
    
    for i=1,reps do 
    
    start=xpos+50
    finish=start+200
    ypos1=(ypos-10)+((i-1)*20)
    endx=start+(loadtable[i]*50)
        bmeter({c=bluegrey,wid=5,tx=start,ty=ypos1,lcap="round",ht=5,max=4,length=200,spacing=4,comd=loadtable[i]})
        out({c=white,a=1,f="FreeMono",fs=12,fw=bold,x=start+210,y=ypos1+5,txt=loadnumtable[i]}) 
        out({c=white,a=1,f="FreeMono:Bold",fs=10,x=start-50,y=ypos1+5,txt=labeltable[i]}) 
    
    end--for
    
    --#################################################           Storage
    
    ypos=610
    
        out({c=yellow,a=1,f="Anonymous Pro:bold",fs=12,x=xpos,y=ypos-30,txt="Storage:"})
    disktable={fsys_perc,home_perc}
    labeltable={"Fsys","Home"}
    --labeltable={"Disk","Fsys","Home","USB"}
    percenttable={disk_perc,fsys_perc,home_perc,newvolume_perc}
    sizetable={disk_total,fsys_total,home_total,newvolume_total}
    usedtable={disk_used,fsys_used,home_used,newvolume_used}
    freetable={disk_free,fsys_free,home_free,newvolume_free}
    reps=#percenttable
    
    for i=1,reps do 
    
    start=xpos+50
    finish=start+200
    ypos1=(ypos-10)+((i-1)*20)
    endx=start+(percenttable[i]*2)
        bmeter({c=bluegrey,wid=5,tx=start,ty=ypos1,lcap="round",ht=5,max=100,length=200,spacing=4,comd=percenttable[i]})
        out({c=white,a=1,f="FreeMono",fs=12,fw=bold,x=start+210,y=ypos1+5,txt=percenttable[i].." %"}) 
        out({c=white,a=1,f="FreeMono:Bold",fs=10,x=start-50,y=ypos1+5,txt=labeltable[i]}) 
    
    end--for
    
    --#################################################           Memory
    
    ypos=720
    
    out({c=yellow,a=1,f="Anonymous Pro:bold",fs=12,x=xpos,y=ypos-30,txt="Memory:"})
    labeltable={"RAM","Swap"}
    percenttable={memperc,swapperc}
    sizetable={mem,swap}
    reps=#percenttable
    
    for i=1,reps do 
    
    start=xpos+50
    finish=start+200
    ypos1=(ypos-10)+((i-1)*20)
    endx=start+(percenttable[i]*2)
        bmeter({c=bluegrey,wid=5,tx=start,ty=ypos1,lcap="round",ht=5,max=100,length=200,spacing=4,comd=percenttable[i]})
        out({c=white,a=1,f="FreeMono",fs=12,fw=bold,x=start+210,y=ypos1+5,txt=percenttable[i].." %"}) 
        out({c=white,a=1,f="FreeMono:Bold",fs=10,x=start-50,y=ypos1+5,txt=labeltable[i]}) 
    
    end--for
    
    --#################################################           Network Speed
    
    ypos=770
    
    start=xpos+50
    finish=start+200
    ypos1=(ypos-10)+(20)
    upx=start+(uplan*100)
    downx=start+(downlan*20)
    
        out({c=yellow,a=1,f="Anonymous Pro:bold",fs=12,x=xpos,y=ypos-10,txt="Network Speed:"})
    
        bmeter({c=bluegrey,wid=5,tx=start,ty=ypos1,lcap="round",ht=5,max=2,length=200,spacing=4,comd=uplan})
        out({c=white,a=1,f="FreeMono:Bold",fs=10,x=xpos,y=ypos1+5,txt="Up:"})
        out({c=white,a=1,f="FreeMono",fs=12,fw=bold,x=start+210,y=ypos1+5,txt=uplan})
        out({c=white,a=1,f="FreeMono",fs=12,fw=bold,x=start+243,y=ypos1+5,txt="Mbps"})
    
    ypos=560+20
    
        bmeter({c=bluegrey,wid=5,tx=start,ty=ypos1+20,lcap="round",ht=5,max=10,length=200,spacing=4,comd=downlan})
        out({c=white,a=1,f="FreeMono:Bold",fs=10,x=xpos,y=ypos1+25,txt="Down:"})
        out({c=white,a=1,f="FreeMono",fs=12,fw=bold,x=start+210,y=ypos1+25,txt=downlan})
        out({c=white,a=1,f="FreeMono",fs=12,fw=bold,x=start+243,y=ypos1+25,txt="Mbps"})
    
    end--if desktop==1 then
    
    
    --======================================================================================================================================================
    
    end-- if updates>5
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    end-- end main function
    
    
    --#####################      bar meter      #####################
    
    function bmeter(bm)--bar meter--###
        c=nil
        c=(bm.c or 0xffffff)
        wid=nil
        wid=(bm.wid or 3)
        tx=nil
        tx=(bm.tx or 100)
        ty=nil
        ty=(bm.ty or 100)
        lcap=nil
        lcap=(bm.lcap or "butt")
        ht=nil
        ht=(bm.ht or 10)
        comd=nil    
        comd=(bm.comd or tonumber(conky_parse('${cpu cpu0}')))
        max=nil
        max=(bm.max or 100)
        length=nil
        length=(bm.length or 200)
        spacing=nil
        spacing=(bm.spacing or 5)
    
    
    
    if lcap =="square" then lcap=CAIRO_LINE_CAP_SQUARE
    elseif lcap =="round" then lcap=CAIRO_LINE_CAP_ROUND
    else lcap=CAIRO_LINE_CAP_BUTT
    end--if
        lineout({strtx=tx,enx=tx+length,strty=ty+(ht/2),eny=ty+(ht/2),lc=CAIRO_LINE_CAP_BUTT,c=c,a=0.1,lw=ht*2})
    
    reps=(length*((comd/max)))/spacing
    
    for i=1,reps do
        xpos1=tx+((i-1)*spacing)
        lineout({strtx=xpos1,enx=xpos1,strty=ty,eny=ty+ht,lc=lcap,c=c,a=0.1,lw=wid})
        lineout({strtx=xpos1,enx=xpos1,strty=ty,eny=ty+ht,lc=lcap,c=c,a=0.6,lw=wid/2})
        lineout({strtx=xpos1,enx=xpos1,strty=ty,eny=ty+ht,lc=lcap,c=c,a=1,lw=wid/wid})
    end--for
    end--function bmeter
    
    --bmeter({c=0x0000ff,wid=5,tx=100,ty=100,lc="round",ht=10,max=100,length=200,spacing=5,comd=command})
    
    --#####################      round rectangle      #####################
    
    function rndrect(rndrect)--round rectangle
        c1=nil
        c1=(rndrect.c1 or 0xffffff)
        c2=nil
        c2=(rndrect.c2 or 0xff0000)
        a1=nil
        border=nil
        border=(rndrect.border or "no")
        a1=(rndrect.a1 or 1)
        a2=nil
        a2=(rndrect.a2 or 1)
        lc=nil
        lc=(rndrect.lc or CAIRO_LINE_CAP_BUTT)
        lw=nil
        lw=(rndrect.lw or 3)
        width=nil
        width=(rndrect.width or 100)
        height=nil
        height=(rndrect.height or 100)
        tlx=nil
        tlx=(rndrect.tlx or 100)
        tly=nil
        tly=(rndrect.tly or 100)
        radius=nil
        radius=(rndrect.radius or 10)
    
    
    angle1=0
    angle2=angle1+90
    angle3=angle2+90
    angle4=angle3+90
    angle5=angle4+90
    
    
    cairo_arc (cr, tlx + width - radius, tly + radius, radius, (angle1-90)*(math.pi/180), (angle2-90)*(math.pi/180))
    cairo_arc (cr, tlx + width - radius, tly + height - radius, radius, (angle2-90)*(math.pi/180), (angle3-90)*(math.pi/180))
    cairo_arc (cr, tlx + radius, tly + height - radius, radius, (angle3-90)*(math.pi/180), (angle4-90)*(math.pi/180))
    cairo_arc (cr, tlx + radius, tly + radius, radius, (angle4-90)*(math.pi/180), (angle5-90)*(math.pi/180))
    
        cairo_close_path (cr)
    cairo_set_source_rgba (cr,col(c1,a1))
        cairo_set_line_width (cr,lw)
        cairo_set_line_cap  (cr, lc)
    if border=="yes" then
    cairo_fill_preserve (cr)
    cairo_set_source_rgba (cr,col(c2,a2))
    cairo_stroke (cr)
    elseif border=="no" then
    cairo_stroke (cr)
    else
    cairo_fill (cr)
    end
    end
    
    --#####################      color conversion 1      #####################
    
         function rgb_to_r_g_b(col_a)
            return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
        end
        
    --#####################      Color conversion 2      #####################
    
    function col(c,a)
         return ( (c/0x10000) % 0x100)/255,( (c/0x100) % 0x100)/255,(c % 0x100)/255,a
    end--local function
    
    --#####################      number formats      #####################
    
    -- from sam_lie
    -- Compatible with Lua 5.0 and 5.1.
    -- Disclaimer : use at own risk especially for hedge fund reports :-)
    
    ---============================================================
    -- add comma to separate thousands
    -- 
    
    function comma_value(amount)
      local formatted = amount
      while true do  
        formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
        if (k==0) then
          break
        end
      end
      return formatted
    end
    
    ---============================================================
    -- rounds a number to the nearest decimal places
    --
    function round(val, decimal)
      if (decimal) then
        return math.floor( (val * 10^decimal) + 0.5) / (10^decimal)
      else
        return math.floor(val+0.5)
      end
    end
    
    --===================================================================
    -- given a numeric value formats output with comma to separate thousands
    -- and rounded to given decimal places
    --
    --
    function format_num(amount, decimal, prefix, neg_prefix)
      local str_amount,  formatted, famount, remain
    
      decimal = decimal or 2  -- default 2 decimal places
      neg_prefix = neg_prefix or "-" -- default negative sign
    
      famount = math.abs(round(amount,decimal))
      famount = math.floor(famount)
    
      remain = round(math.abs(amount) - famount, decimal)
    
            -- comma to separate the thousands
      formatted = comma_value(famount)
    
            -- attach the decimal portion
      if (decimal > 0) then
        remain = string.sub(tostring(remain),3)
        formatted = formatted .. "." .. remain ..
                    string.rep("0", decimal - string.len(remain))
      end
    
            -- attach prefix string e.g '$' 
      formatted = (prefix or "") .. formatted 
    
            -- if value is negative then format accordingly
      if (amount<0) then
        if (neg_prefix=="()") then
          formatted = "("..formatted ..")"
        else
          formatted = neg_prefix .. formatted 
        end
      end
    
      return formatted
    end
    
    --#####################      Terminal Command      #####################
    
    function os.capture(cmd, raw)
         local f = assert(io.popen(cmd, 'r'))
         local s = assert(f:read('*a'))
        f:close()
         if raw then return s end
        s = string.gsub(s, '^%s+', '')
        s = string.gsub(s, '%s+$', '')
        s = string.gsub(s, '[\n\r]+', ' ')
         return s
    end
    
    --#####################      Lines      #####################
    
    function lineout(ln)--Lines--###
        c=nil
        c=(ln.c or 0xffffff)
        a=nil
        a=(ln.a or 1)
        lw=nil
        lw=(ln.lw or 3)
        lc=nil
        lc=(ln.lc or CAIRO_LINE_CAP_BUTT)
        strtx=nil
        strtx=(ln.strtx or 0)
        strty=nil
        strty=(ln.strty or 0)
        enx=nil
        enx=(ln.enx or 50)
        eny=nil
        eny=(ln.eny or 50)
    ---------------------------------------
        cairo_set_line_width (cr,lw)
        cairo_set_line_cap  (cr, lc)
        cairo_set_source_rgba (cr,col(c,a))
        cairo_move_to (cr,strtx,strty)
        cairo_line_to (cr,enx,eny)
        cairo_stroke (cr)
    end--function lineout ###
    
    --#####################      Text      #####################
    
    function out(tx)
    c=nil
    c=(tx.c or 0xffffff)
    a=nil
    a=(tx.a or 1)
    f=nil
    f=(tx.f or "mono")
    fs=nil
    fs=(tx.fs or 12)
    rotang=nil
    rotang=(tx.rotang or 0)
    x=nil
    x=(tx.x or 0)
    y=nil
    y=(tx.y or 0)
    ra=nil
    ra=(tx.ra or 0)
    txt=nil
    txt=(tx.txt or "set txt")
    fw=nil
    fw=(tx.fw or CAIRO_FONT_WEIGHT_NORMAL)
    cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, fw);
    cairo_set_font_size (cr, fs)
    cairo_set_source_rgba (cr,col(c,a))
    cairo_move_to (cr,x,y)
        cairo_rotate (cr, rotang*(math.pi/180))
    cairo_show_text (cr,txt)
    cairo_stroke (cr)
        cairo_rotate (cr, -rotang*(math.pi/180))
    end--function out
    Last edited by alpetjr; March 8th, 2018 at 12:15 PM.

  5. #23375
    Join Date
    Feb 2011
    Beans
    45
    Distro
    Ubuntu Mate

    Re: Post your .conkyrc files w/ screenshots

    I am trying to get my conky to display in fahrenheit using
    temperature_unit = fahrenheit,
    I keep getting this error
    conky: Syntax error (/home/al/sylintile/conky:57: '}' expected (to close '{' at line 1) near 'temperature_unit') while reading config file.
    Anybody have any ideas? Thx

  6. #23376
    Join Date
    Dec 2011
    Location
    Atlanta, Georgia USA
    Beans
    45
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Post your .conkyrc files w/ screenshots

    alpetjr,


    If you want to post the output of

    Code:
    df -H --total
    or

    Code:
    df -h --total
    depending on what units you want to display (GB or GiB), I'll see what I can do to help.
    Ubuntu User #35429 | Linux User #558865

  7. #23377
    Join Date
    Dec 2011
    Location
    Atlanta, Georgia USA
    Beans
    45
    Distro
    Xubuntu 16.04 Xenial Xerus

    Post Re: Post your .conkyrc files w/ screenshots

    Sorry, I didn't see your last post until after I posted my last one. I've never found that to work with a lua script. What I do is let the script calculate it by doing (for example)

    Code:
        cputemp2=tonumber(os.capture("sensors | grep -m 1 'Package id' | cut -c17-20"))
        cputemp=(cputemp2×1.8)+32
    Ubuntu User #35429 | Linux User #558865

  8. #23378
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Post your .conkyrc files w/ screenshots

    Nice work everyone now this thread is getting fun again!
    Now I'm off to my conky anonymous meeting! LOL
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  9. #23379
    Join Date
    Dec 2011
    Location
    Atlanta, Georgia USA
    Beans
    45
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Post your .conkyrc files w/ screenshots

    Step one:
    "We admitted we were powerless over conky, and we love it."
    Ubuntu User #35429 | Linux User #558865

  10. #23380
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by stylintile View Post
    Step one:
    "We admitted we were powerless over conky, and we love it."
    Ain't that the Truth!
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

Page 2338 of 2348 FirstFirst ... 1338183822382288232823362337233823392340 ... 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
  •