Page 2140 of 2328 FirstFirst ... 1140164020402090213021382139214021412142215021902240 ... LastLast
Results 21,391 to 21,400 of 23276

Thread: Post your .conkyrc files w/ screenshots

  1. #21391
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Petro Dawg View Post
    I couldn't wait until this weekend to start using the new tricks I learned from dk75's explanation of AWK. I updated my code and replace most of the "grep" with "awk".
    Looking good there PD. Not wanting to take you away from your learning of awk, I still have to play with it, but you might like this as well.

    mrpeachy's 'mounted.lua' script:
    Code:
    --[[partitions for conky by mrpeachy
    ##instructions
    ##load script
    lua_load ~/lua/mounted.lua
    ## first lua command below text:
    ## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
    ## to get output:
    ## ${lua mount partition_number data_type text_length}, where partition number is a number
    ## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
    ## data_type can be
    ## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
    ## fsys - shows filesystem
    ## size - shows space used in appropriate units
    ## free - shows free space in appropriate units
    ## use% - shows % used
    ## mount - shows mountpoint
    
    TEXT
    CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
    TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
    FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
    ${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
    ${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
    ${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
    ${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}
    
    ]]
    
    conky_start=1
    function conky_get_mounted_data(interval)
    local updates=tonumber(conky_parse("${updates}"))
    timer=(updates % interval)
    if timer==0 or conky_start==1 then
    fsys={}
    size={}
    used={}
    avail={}
    uperc={}
    mount={}
    local file = io.popen("df -h")
    	for line in file:lines() do
    		if string.find(line,"/dev/")~=nil then
    		local s,f,fs=string.find(line,"^([%d%a%p]*)%s")
    		table.insert(fsys,fs)
    		local s,f,sz=string.find(line,"%s*([%d%a%p]*)%s",f)
    		table.insert(size,sz)
    		local s,f,us=string.find(line,"%s*([%d%a%p]*)%s",f)
    		table.insert(used,us)
    		local s,f,av=string.find(line,"%s*([%d%a%p]*)%s",f)
    		table.insert(avail,av)
    		local s,f,up=string.find(line,"%s*([%d%a%p]*)%s",f)
    		table.insert(uperc,up)
    		local s,f,mn=string.find(line,"%s*([%d%a%p]*)%s*$",f)
    		table.insert(mount,mn)
    		end
    	end
    file:close()
    conky_start=nil
    end--timed section
    return ""
    end
    
    function conky_mount(n,d,c)--n=partition_number,d=data_type,c=number of characters to return
    d=tostring(d)
    n=tonumber(n)
    c=tonumber(c) or 0
    if d=="total" then
    data=#fsys or 1
    elseif d=="fsys" then
    data=fsys[n] or ""
    	if c~=0 then
    	data=string.sub(data,1,c) or ""
    	end
    elseif d=="size" then
    data=size[n] or ""
    elseif d=="used" then
    data=used[n] or ""
    elseif d=="free" then
    data=avail[n] or ""
    elseif d=="use%" then
    data=uperc[n] or ""
    elseif d=="mount" then
    data=mount[n] or ""
    	if c~=0 then
    	data=string.sub(data,1,c) or ""
    	end
    else
    data="check data type"
    end
    return data
    end--end main function
    Gotta love Linux - always options!
    Attached Images Attached Images

  2. #21392
    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
    Looking good there PD. Not wanting to take you away from your learning of awk, I still have to play with it, but you might like this as well.

    mrpeachy's 'mounted.lua' script:
    I think I remember that, or something similar, back when I first started the mounted USB port stuff. Its a powerful script but I'm really just interested in my USB drives at the moment. I'm sure there is somebody out there that would like to see all their mounted devices though.

    I was working on getting my Android phone to show up as well and finally got it to work correctly with the following conky code.

    Code:
    ${if_existing  /media/18DC-5C04}
    ${execp df -H | awk '/18DC-5C04/ {print "Android:${alignr}" $3, "/", $2}'}${endif}
    Since I don't change out phones very often, the specific ID# in my code for my particular phone is good enough for me. The trial and error involved in figuring this out taught me how to align stuff in Conky within the print command. I'm really getting to like AWK.
    Attached Images Attached Images
    Last edited by Petro Dawg; January 5th, 2013 at 03:50 PM.
    Who's Awesome? You're Awesome.

  3. #21393
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Petro Dawg View Post
    I think I remember that, or something similar, back when I first started the mounted USB port stuff. Its a powerful script but I'm really just interested in my USB drives at the moment. I'm sure there is somebody out there that would like to see all their mounted devices though.

    I was working on getting my Android phone to show up as well and finally got it to work correctly with the following conky code.

    Code:
    ${if_existing  /media/18DC-5C04}
    ${execp df -H | awk '/18DC-5C04/ {print "Andriod:${alignr}" $3, "/", $2}'}${endif}
    Since I don't change out phones very often, the specific ID# in my code for my particular phone is good enough for me. The trial and error involved in figuring this out taught me how to align stuff in Conky within the print command. I'm really getting to like AWK.
    CLICK! Of course you did, and I was involved in it... sometimes my forgetter gets the better of me:

    • /media/5/conky/test267.PetroDawg.conky
    • /media/5/conky/test267.PetroDawg_2.conky


    DUH!!!!

    BTW, you have a spelling Oops! Andriod = Android - I do it all the time. The keys on my keyboard move around on their own just to confuse me.

    Android -> Linux -> Conky -> What version?
    Curious have you tried Android Apps on your Linux machine? Not to "develop" but to use.

    If that media is removable as the ${if_existing} suggests you can reserve that line in your conky so the "space" is always there with something in it:

    Code:
    ${if_existing  /media/18DC-5C04}
    ${execp df -H | awk '/18DC-5C04/ {print "Andriod:${alignr}" $3, "/", $2}'}${else}Android:${alignr}Empty${endif}
    After 45 minutes of testing, and I blame you Petro Dawg for getting me started, well and dk75 ...

    I now have a /media/5/conky/test267.PetroDawg_3.conky

    Code:
    TEXT
    ${alignc}CPU0 ${cpu cpu0} %
    Using /dev/sdd1
    
    ${if_existing  /dev/sdd1}\
    ${execp df -H | awk '/sdd1/ {print "Android:${alignr}" $3, "/", $2}'}\
    ${else}Android:${alignr}Empty\
    ${endif}
     - or -
    Android: ${alignr}\
    ${if_existing  /dev/sdd1}${execp df -H | awk '/sdd1/ {print $3, "/", $2}'}\
    ${else}Empty\
    ${endif}
    
    Using /dev/sda5 - always mounted
    
    Android: ${alignr}\
    ${if_existing  /dev/sda5}${execp df -H | awk '/sda5/ {print $3, "/", $2}'}\
    ${else}Empty\
    ${endif}
    as you see I like to use the \ to make long lines shorter and in a lot of case to keep track of the 'if_' and 'endif' = the same number
    Attached Images Attached Images

  4. #21394
    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
    CLICK! Of course you did, and I was involved in it... sometimes my forgetter gets the better of me:

    • /media/5/conky/test267.PetroDawg.conky
    • /media/5/conky/test267.PetroDawg_2.conky


    DUH!!!!

    BTW, you have a spelling Oops! Andriod = Android - I do it all the time. The keys on my keyboard move around on their own just to confuse me.

    Android -> Linux -> Conky -> What version?
    Curious have you tried Android Apps on your Linux machine? Not to "develop" but to use.

    If that media is removable as the ${if_existing} suggests you can reserve that line in your conky so the "space" is always there with something in it:

    Code:
    ${if_existing  /media/18DC-5C04}
    ${execp df -H | awk '/18DC-5C04/ {print "Andriod:${alignr}" $3, "/", $2}'}${else}Android:${alignr}Empty${endif}
    After 45 minutes of testing, and I blame you Petro Dawg for getting me started, well and dk75 ...

    I now have a /media/5/conky/test267.PetroDawg_3.conky
    DERP, yup I fixed my spelling. I did manage to spell it correctly once in my last post before the edit however.

    If I understand your comment correctly, I should clarify. I just have my phone show up on my PC Conky when the phone is mounted. I do not have Linux or Conky running on my phone, yet. (Yes I know Android OS is Linux, but you know what I mean) And no, I have no Android Apps on my PC, yet. But now you got me thinking about doing it. I suppose a touch screen would be required to make the most of it though.

    As far as reserving a space; Yes you can reserve the line if you wanted to, I had to format my code the way I did to have the line disappear when the media is unplugged as I did not want added reserved lines, the full code for that section is as follows.

    Code:
    Root: ${alignr}${fs_used /} / ${fs_size /}
    ${outlinecolor black}${color1}${fs_bar 5 /}${outlinecolor}${color}
    Home: ${alignr}${fs_used /home} / ${fs_size /home}
    ${outlinecolor black}${color1}${fs_bar 5 /home}${outlinecolor}${color}${if_existing  /dev/sdb1}
    ${execp df -H | grep 'sdb1' | cut -c46-56}:${alignr}${execp df -H | awk '/sdb1/ {print $3, "/", $2}'}${else}${endif}${if_existing  /dev/sdc1}
    ${execp df -H | grep 'sdc1' | cut -c46-56}:${alignr}${execp df -H | awk '/sdc1/ {print $3, "/", $2}'}${else}${endif}${if_existing  /dev/sdd1}
    ${execp df -H | grep 'sdd1' | cut -c46-56}:${alignr}${execp df -H | awk '/sdd1/ {print $3, "/", $2}'}${else}${endif}${if_existing  /media/18DC-5C04}
    ${execp df -H | awk '/18DC-5C04/ {print "Android:${alignr}" $3, "/", $2}'}${endif}
    Attached Images Attached Images
    Last edited by Petro Dawg; January 5th, 2013 at 03:53 PM.
    Who's Awesome? You're Awesome.

  5. #21395
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    @ Petro Dawg

    Spelling Oopsies are embarrassing but not dangerous unless the "error" is a real word and can cause a change in meaning. Now that can get you in trouble.

    Oh, now I understand, That makes sense ... I probably would have done the same except I would have ended it with:
    Code:
    ...gnr}" $3, "/", $2}'}${else}${endif}
    to preserve that space anyway. But that's just a quirk of mine.

    Google has an SDK package that allows Linux users to develop Android Apps so I would imagine in that environment you can. 32bit libraries are required, I Googled it earlier.

  6. #21396
    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
    @ Petro Dawg

    Spelling Oopsies are embarrassing but not dangerous unless the "error" is a real word and can cause a change in meaning. Now that can get you in trouble.

    Oh, now I understand, That makes sense ... I probably would have done the same except I would have ended it with:
    Code:
    ...gnr}" $3, "/", $2}'}${else}${endif}
    to preserve that space anyway. But that's just a quirk of mine.

    Google has an SDK package that allows Linux users to develop Android Apps so I would imagine in that environment you can. 32bit libraries are required, I Googled it earlier.
    I will keep that in mind if I ever decide to overhaul my design (if I ever get around to using lua scripts and such) and need my Conky to maintain a constant length.

    If you reserve the lines however, wouldn't you want a place holder printout to fill the line when nothing is mounted such as "USB1: Not Mounted" or "Android: Unplugged"? Otherwise the Conky display would have just a bunch of empty lines, and would look odd (at least to me).

    My next project is getting my Conky to display the number of unread emails in my thunderbird accounts. I've tried this before with no luck, I will give it another go this weekend. I used to be able to see my email count plainly from the Unity launch bar, but since I use Docky now, I need it to appear somewhere convenient.
    Last edited by Petro Dawg; January 5th, 2013 at 05:44 PM.
    Who's Awesome? You're Awesome.

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

    Re: Post your .conkyrc files w/ screenshots

    Well, I'm stumped. I have 3 email accounts managed by Thunderbird (which is always running minimized in the background). 2 of which I can get to show up just fine in Conky, but the 3rd always displays 0 new messages even though there are 3 unread in the folder.

    I'm fairly certain my file path and code is correct, I think for some reason unread messages are not being marked with the code "0000" in my IMAP account as they are in the two pop3 accounts.

    Code:
    #Email stuff
    Utulsa:${alignr}${execi 60 grep -c "X-Mozilla-Status: 0000" ~/.thunderbird/a7syjn0d.default/ImapMail/imap.gmail.com/INBOX} 
    AtlasOK:${alignr}${execi 60 grep -c "X-Mozilla-Status: 0000" ~/.thunderbird/a7syjn0d.default/Mail/pop3.atlasok.com/Inbox} 
    Hotmail:${alignr}${execi 60 grep -c "X-Mozilla-Status: 0000" ~/.thunderbird/a7syjn0d.default/Mail/pop3.live.com/Inbox}
    Is there any other way to do this? I would love to hear any ideas on this. This maybe more of a Thunderbird issue than Conky perhaps.
    Attached Images Attached Images
    Who's Awesome? You're Awesome.

  8. #21398
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Petro Dawg View Post
    I will keep that in mind if I ever decide to overhaul my design (if I ever get around to using lua scripts and such) and need my Conky to maintain a constant length.

    If you reserve the lines however, wouldn't you want a place holder printout to fill the line when nothing is mounted such as "USB1: Not Mounted" or "Android: Unplugged"? Otherwise the Conky display would have just a bunch of empty lines, and would look odd (at least to me).
    Well, yes that is true, again a matter of opinion and personal quirks. On mine if I know what they are I would build them to to have a spot and then say: Not Mounted etc etc if they were not there. I (opinion alert) don't like conkys that grow and shrink as things get plugged in or removed.

    Same as "percents" I'd rather have spaces set aside for when % values change:

    CPU 1 xx5% <<--- where xx are space holders

    Code:
    ${alignc}${color3}CPU Usage ${color7}1: ${color}${if_match ${cpu cpu1}<10}  ${cpu cpu1}\
    ${else}${if_match ${cpu cpu1}<100} ${cpu cpu1}\
    ${else}${cpu cpu1}${endif}${endif} %\
     ${color7}2: ${color}${if_match ${cpu cpu2}<10}  ${cpu cpu2}\
    ${else}${if_match ${cpu cpu2}<100} ${cpu cpu2}\
    ${else}${cpu cpu2}${endif}${endif} %\
     ${color7}3: ${color}${if_match ${cpu cpu3}<10}  ${cpu cpu3}\
    ${else}${if_match ${cpu cpu3}<100} ${cpu cpu3}\
    ${else}${cpu cpu3}${endif}${endif} %\
     ${color7}Avg: ${color}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
    ${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
    ${else}${cpu cpu0}${endif}${endif} %
    Attached Images Attached Images

  9. #21399
    Join Date
    Feb 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    @ Petro Dawg

    I use claws-mail and icedove (Debian's Thinderbird) for four accounts. And I've used "conkyEmail" for years. Even when I was using Thunderbird with Ubuntu and Xubuntu. It has never failed me.

    They are:
    • C - my wife's two accounts (icedove)
    • S - my two accounts (claws-mail)
    • D = ${desktop}${desktop}:${desktop}${desktop}
    • 4.99108 - is a currency exchange rate.


    I'm guessing Thunderbird issue.
    Attached Images Attached Images
    Last edited by Sector11; January 5th, 2013 at 10:12 PM.

  10. #21400
    Join Date
    Oct 2010
    Location
    Sweden
    Beans
    822
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Petro Dawg View Post
    Is there any other way to do this? I would love to hear any ideas on this. This maybe more of a Thunderbird issue than Conky perhaps.
    Sector11 beat me to it. I use conkyEmail script as well.
    I have it pulling from two personal IMAP accounts as well as from my work Exchange account. The exchange account requires DavMail to be installed.

    Last edited by GrouchyGaijin; January 5th, 2013 at 10:22 PM. Reason: Forgot the obligatory Conky screenshot :-)
    Thank you,
    GG -----------
    GUI we don't need no stinking GUI: A collection of Bash scripts
    Mutt (email), cmus (music),Google Calendar and Google Tasks cli

Page 2140 of 2328 FirstFirst ... 1140164020402090213021382139214021412142215021902240 ... 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
  •