Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
mrpeachy
see here for some lua math with conky variables
http://crunchbanglinux.org/forums/post/128997/#p128997
probably needs some updating with the newer versions of conky
however, date and time calculations are a special case - values roll around and no negatives
re time calculations
well i would just do the whole vnstat conky in lua anyway and cut out the middle man
if you want it automated you might need 2 functions, one to evaluate which months data to show and one to evaluate the year as you are going to have the case at the start of the year when you want to show the month before, which will also be the year before... i forget how vnstat displays its data
:roll: ...My theory that you were going to show up with one of these scripts was not only correct... You had it for a while already? Man... I AM slow lately.
Not gonna lie. I'm feelin' overwhelmed now that BOTH the masters are demonstrating how behind I am. Every time one of the two of you shows up, I'm like a little kid sitting cross-legged on the ground, frantically learning whatever he can make sense of from a teacher. With BOTH of you doing this in the past few days? I think I need a nap :P I'm not getting anything through this thick skull in the condition I'm in :P
*Bows to the Masters*
P.S. mrpeachy has just generated the Twenty THOUSANDTH Post in this thread. If minds aren't blown by that, there's something wrong with the world.
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
42dorian
P.S. mrpeachy has just generated the Twenty THOUSANDTH Post in this thread. If minds aren't blown by that, there's something wrong with the world.
i didnt even notice... yay me!
i know for a fact that dk75 could code rings around me with ease :D
i just know what i know, a specific code niche if you like
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
mrpeachy
i didnt even notice... yay me!
i know for a fact that dk75 could code rings around me with ease :D
i just know what i know, a specific code niche if you like
Regardless of who can code what, you two are my LUA Masters. Lately, no matter how hard I try, and how many times I go into it saying "I've picked this up from mrpeachy before, I can do this!", it ends with my head spinning and me crawling back here for more lessons :P
The difference here being I'm PRETTY SURE I'm picking it up from you and dk75. I have no doubt that I CAN do it. Just, lately it's out of reach. I think the recent issues with my parents in the hospital has scrambled my marbles a bit or something :P (They're fine, no worries.) I just don't think my brain is back in code mode yet, that's all.
What HASN'T changed is that you two are AWESOME. I knew dk75 was a LUA guy, but this AWK stuff... Out of the blue like a revelation. The things you two contribute to Conky is mind blowing.
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
42dorian
That last part is exactly as complex as it needs to be. Because it's telling the vnstat calls to look at the PREVIOUS MONTH'S data until the 11th of each month when it switches over. Thus, it checks to see if it is CURRENTLY the 11th of this current month and year. If not, it checks what month it IS, and depending on what month that is, it looks for a month that precedes it.
hm... so basically to the 11th of each month you display last month result, and since 11th you display present month result?
Then it shouldn't be to hard... it needs only 3 date invocation (what day it is, what month it is and what month was last) and then some AWK script to compare.
It could be reduced to 2 date invocation even, since current day and month could be fetched in one call.
So 2 date and 1 awk invocation.
Lets see... this should do...
Code:
#-----Monthly/Daily Bandwidth Usage
${font}${color2}NETWORK DATA USE${color6}${hr 1}${color2}
${goto 35}${color2}Today${goto 125}Monthly
${color2}${goto 15}U:${goto 30}${color1}${font TransponderAOE:bold:size=12}${execpi 60 vnstat -d | awk '$0 ~ "'$(date +%D)'" {print $5"${goto 85}"$6}'}${goto 120}${execpi 60 vnstat -m |awk -v currDate="$(env LANG=en date +%-e-%b)" -v lastMonth="$(env LANG=en date -d 'last month' +%b)" 'BEGIN{split(currDate,currDateArray,"-"); if (currDayArray[1]<11) monthStat=lastMonth; else monthStat=currDayArray[2];} $0 ~ monthStat {print $6"${goto 175}"$7}'
${color2}${goto 15}D:${goto 30}${color4}${font TransponderAOE:bold:size=12}${execpi 60 vnstat -d | awk '$0 ~ "'$(date +%D)'" {print $2"${goto 85}"$3}'}${goto 120}${execpi 60 vnstat -m |awk -v currDate="$(env LANG=en date +%-e-%b)" -v lastMonth="$(env LANG=en date -d 'last month' +%b)" 'BEGIN{split(currDate,currDateArray,"-"); if (currDayArray[1]<11) monthStat=lastMonth; else monthStat=currDayArray[2];} $0 ~ monthStat {print $3"${goto 175}"$4}'
${color2}${goto 15}T:${goto 30}${color1}${font TransponderAOE:bold:size=12}${execpi 60 vnstat -d | awk '$0 ~ "'$(date +%D)'" {print $8"${goto 85}"$9}'}${goto 120}${execpi 60 vnstat -m |awk -v currDate="$(env LANG=en date +%-e-%b)" -v lastMonth="$(env LANG=en date -d 'last month' +%b)" 'BEGIN{split(currDate,currDateArray,"-"); if (currDayArray[1]<11) monthStat=lastMonth; else monthStat=currDayArray[2];} $0 ~ monthStat {print $9"${goto 175}"$10}'
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
jmfal
This my first post in this thread, conky sure is addictive.
A couple of questions:
1. When opening conky in a terminal should it return to a command prompt? mine does not.
2. I have a temp displaying whee there is no code for it? (Between Core1 and cpu bar)
3. Does conky have the ability too read multiple hard drives?
Addictive is the word...
1. Not necessarily. Mine doesn't. But put an & after the command and you can hit [Enter] to get the prompt again. And you can also use && to chain commands, remember the & at the end:
Code:
conky -c ~/path_to/your_conky &
killall conky && conky -c ~/path_to/your_conky &
2. Yes, you are calling it. Terminal: "sensors" and you will see 'temp1' twice (I see 3) so:
Code:
${exec sensors |grep 'temp1'| awk '{print $2}'| cut -c2-3}C
will show 'all' the 'temp1' entries it finds. Show us the output of sensors please.
3. Yes - you have sda, sdb and sdc in place and waiting, not having multiple drives for years now I'll show partitions:
Code:
${color}DISK ${hr 2}
HDD/sda 1000Gb|${fs_free /} / ${fs_size /} // ${fs_free_perc /}%
${fs_bar 6 /}$color
HDD/sdb| 500Gb|${fs_free /home} / ${fs_size /home} // ${fs_free_perc /home}%
sdb:Win7: ${fs_bar 6 /home}$color
HDD/sdc| 160Gb|${fs_free /media/5} / ${fs_size /media/5} // ${fs_free_perc /media/5}%
sdc:${fs_type /media/5}: ${fs_bar 6 /media/5}
This SHOULD work following the logic above where I am showing various partitions: If I'm wrong maybe someone with two or more HDD's can pitch in here.
Code:
${color}DISK ${hr 2}
HDD/sda 1000Gb|${fs_free /} / ${fs_size /} // ${fs_free_perc /}%
${fs_bar 6 /}$color
HDD/sdb| 500Gb|${fs_free /dev/sdb/} / ${fs_size /dev/sdb/} // ${fs_free_perc /dev/sdb/}%
sdb:Win7: ${fs_bar 6 /dev/sdb/}$color
HDD/sdc| 160Gb|${fs_free /dev/sdc/} / ${fs_size /dev/sdc/} // ${fs_free_perc /dev/sdc/}%
sdc:${fs_type /dev/sdc/}: ${fs_bar 6 /dev/sdc/}
Quote:
Originally Posted by
jmfal
I could not get a screenshot of my conky, I guess I need some help with that too.
Help Appreciated
Can't help with the screenshot, I don't use Ubuntu.
http://t.imgbox.com/aacAFj1F.jpg
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
Sector11
Addictive is the word...
1. Not necessarily. Mine doesn't. But put an
& after the command and you can hit [Enter] to get the prompt again. And you can also use
&& to chain commands, remember the
& at the end:
Code:
conky -c ~/path_to/your_conky &
killall conky && conky -c ~/path_to/your_conky &
At the beginning of Conky config file there is a line
It doesn't control of drawing of background behind Conky window but whatever Conky should be run at "background" (thus returns prompt to the terminal) or not.
Change that to
and that's it.
As for screen shots... hit "PrtScr" button on keyboard or search for screen shot program in accessory system menu.
By default, "PrtScr" saves PNG's to "~/Picture" folder (your home picture folder), where with a program from menu, you could set it manually among other things.
Re: Post your .conkyrc files w/ screenshots
Thanks for the reply Sector11
The code for hdd2$3 displays 0/0 0%. I'm assuming that they will register when mounted. I'm trying to get them to display without mounting.
Found a thread about using :
Code:
if_used
if_existing
if_mounted
endif
They where not very clear on use.
Output of $sensors
Code:
jeff@jeff-ET1331G:~$ sensors
it8716-isa-0a10
Adapter: ISA adapter
in0: +0.94 V (min = +0.00 V, max = +1.02 V) ALARM
in1: +2.48 V (min = +0.00 V, max = +0.03 V) ALARM
in2: +1.78 V (min = +0.00 V, max = +0.00 V) ALARM
in3: +3.39 V (min = +0.03 V, max = +2.05 V) ALARM
in4: +3.06 V (min = +0.00 V, max = +1.02 V) ALARM
in5: +1.15 V (min = +0.00 V, max = +0.00 V) ALARM
in6: +3.02 V (min = +0.00 V, max = +0.00 V) ALARM
5VSB: +2.91 V (min = +2.30 V, max = +2.56 V) ALARM
Vbat: +3.28 V
fan1: 1880 RPM (min = -1 RPM) ALARM
fan2: 0 RPM (min = -1 RPM) ALARM
fan3: 0 RPM (min = 10546 RPM) ALARM
temp1: +26.0°C (low = -110.0°C, high = +0.0°C) sensor = thermal diode
temp2: +34.0°C (low = +40.0°C, high = +32.0°C) ALARM sensor = thermistor
temp3: -128.0°C (low = +0.0°C, high = +0.0°C) sensor = disabled
cpu0_vid: +1.525 V
intrusion0: OK
k10temp-pci-00c3
Adapter: PCI adapter
temp1: +20.5°C (high = +70.0°C)
jeff@jeff-ET1331G:~$
I can't find where I called "temp1" "3 times" unless you are talking about using "grep|awk". I couldn't get it to display without using "awk".
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
dk75
At the beginning of Conky config file there is a line
It doesn't control of drawing of background behind Conky window but whatever Conky should be run at "background" (thus returns prompt to the terminal) or not.
Change that to
and that's it.
I ran a test, all mine are no so I changed it to yes:
http://t.imgbox.com/aavFqCgZ.jpg
no prompt ...
killed conky, in another terminal, changed background to no
http://t.imgbox.com/aaulfyJP.jpg
and used the same terminal to start the conky again and I still had to hit [Enter] to get a prompt.
Does not say if there is a default:
Quote:
background
Boolean value, if true, Conky will be forked to background when started.
jmfal's conky does not have 'background' above TEXT so whatever 'is' default applied.
I wonder it it could be an OS and/or "how things are setup" thing? I have always had to hit enter to get a prompt.
Quote:
Originally Posted by
dk75
As for screen shots... hit "PrtScr" button on keyboard or search for screen shot program in accessory system menu.
By default, "PrtScr" saves PNG's to "~/Picture" folder (your home picture folder), where with a program from menu, you could set it manually among other things.
I should have though of that but I don't have a ~/Pictures directory so they get lost "someplace in the cosmos". :D
My OpenBox menus puts them in ~/images - I'll have to change the [PtrScr] function to is ~/image vs "the cosmos"
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
jmfal
[SIZE=3]T[SIZE=2]hanks for the reply Sector11
You're welcome ...
Some things I missed:
Code:
Conky: /home/jeff/.conkyrc: 47: no such configuration: 'border_margin'
border_margin is depreciated:
Change:
Code:
# border margins
border_margin 5
to:
Code:
# border margins
border_inner_margin 5
border_outer_margin 0
That will clear up that error.
Next font 'arial' can't load... change these:
and
Code:
xftfont Arial:size=8
and this:
to:
Code:
use_spacer right #left, right or none - defaults to right if 'yes'
Quote:
Originally Posted by
jmfal
The code for hdd2$3 displays 0/0 0%. I'm assuming that they will register when mounted. I'm trying to get them to display without mounting.
Found a thread about using :
Code:
if_used
if_existing
if_mounted
endif
They where not very clear on use.
Good example found here for $if_existing --->>> remember for EVERY ${if_something] you need an ${endif}
Quote:
Originally Posted by
jmfal
Output of $sensors
Code:
jeff@jeff-ET1331G:~$ sensors
it8716-isa-0a10
Adapter: ISA adapter
in0: +0.94 V (min = +0.00 V, max = +1.02 V) ALARM
in1: +2.48 V (min = +0.00 V, max = +0.03 V) ALARM
in2: +1.78 V (min = +0.00 V, max = +0.00 V) ALARM
in3: +3.39 V (min = +0.03 V, max = +2.05 V) ALARM
in4: +3.06 V (min = +0.00 V, max = +1.02 V) ALARM
in5: +1.15 V (min = +0.00 V, max = +0.00 V) ALARM
in6: +3.02 V (min = +0.00 V, max = +0.00 V) ALARM
5VSB: +2.91 V (min = +2.30 V, max = +2.56 V) ALARM
Vbat: +3.28 V
fan1: 1880 RPM (min = -1 RPM) ALARM
fan2: 0 RPM (min = -1 RPM) ALARM
fan3: 0 RPM (min = 10546 RPM) ALARM
temp1: +26.0°C (low = -110.0°C, high = +0.0°C) sensor = thermal diode
temp2: +34.0°C (low = +40.0°C, high = +32.0°C) ALARM sensor = thermistor
temp3: -128.0°C (low = +0.0°C, high = +0.0°C) sensor = disabled
cpu0_vid: +1.525 V
intrusion0: OK
k10temp-pci-00c3
Adapter: PCI adapter
temp1: +20.5°C (high = +70.0°C)
jeff@jeff-ET1331G:~$
I can't find where I called "temp1" "3 times" unless you are talking about using "grep|awk". I couldn't get it to display without using "awk".
Exactly, when you used:
Code:
Core 1: ${freq 1} MHz Temprature:$color${exec sensors |grep 'temp1'| awk '{print $2}'| cut -c2-3}C
that grep 'temp1' grabbed both:
Code:
temp1: +26.0°C (low = -110.0°C, high = +0.0°C) sensor = thermal diode
temp1: +20.5°C (high = +70.0°C)
What you can use, and it's easier to use, is hwmon:
Code:
${hwmon 1 temp 1}
${hwmon 2 temp 1}
To read those two temps.
I think ${hwmon 2 temp 1} will be your CPU temp. Others that understand that better might be able to confirm/deny that.
OR you could grep '(high = +70.0°C)' that will give you the second "temp1"
but since hwmon doesn't require an ${exec} call it's easier on resources.
Re: Post your .conkyrc files w/ screenshots
Thanks for the help Sector11 and DK75 !
I added the "background yes" to the very top of code, enter=command prompt.
Would like to find out why that temp1 is displaying, I think it is motherboard/southbridge temp.
Changing background to yes seemed to make colors less vibrant, Oh well.