Conky Showoff thread

Forum rules
Before you post please read how to get help
ostracized
Level 4
Level 4
Posts: 230
Joined: Tue Jun 14, 2016 11:46 pm

Re: Conky Showoff thread

Postby ostracized » Wed Aug 17, 2016 11:45 am

Sector11 wrote:To show both of your cores/cpus change that to:

Code: Select all

    {
        name='cpu',
        arg='cpu1',
        blah blah ...
    },
    {
        name='cpu',
        arg='cpu2',
        blah blah ...
    },


Ok well that's weird, because I didn't touch that from the original authors, which means all of them were unaware of this since 2009?

Does ${pre_exec} work in conky v1.10 yet?

No. ${pre_exec} literally parses into text. That was one needed change to simply exec. And I don't see the advantage of using pre if the execution is not on an interval anyway? Apparently pre_exec was removed quite a while ago.

Here are the updated variables btw: https://github.com/brndnmtthws/conky/wi ... -Variables

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby Sector11 » Wed Aug 17, 2016 1:13 pm

RE: ${cpu} - ${cpu cpu0} = average
ostracized wrote:Ok well that's weird, because I didn't touch that from the original authors, which means all of them were unaware of this since 2009?

In a word: Yes! Even though the conky variable page has explained it for as long as I have been a conky user (2007), "man conky" in a terminal will tell you the same.

There are a lot of people that think because "Intel" reports "CORES" starting at 0, like so many things with computers, and conky has a ${cpu cpu0} command that they are equal. Clearly the conky variable/man page says different. AMD starts counting their multiple 'core' chips with CPU1, CPU2, etc

A simple test in a simple conky:

Code: Select all

TEXT
  CPU %
Avg ${cpu}
Avg ${cpu cpu0}
${hr}
  1 ${cpu cpu1}
  2 ${cpu cpu2}
  3 ${cpu cpu3}

- I have a triple core AMD so I added the ${cpu} command above my ${cpu cpu0} to show in this screehshot

9+11+9=29 and 29/3= 9.666 - 10 is close enough. :)

Stress that out and you will always see ${cpu} and ${cpu cpu0} at the same levels and they will be within a reasonable guestimate of "average".

ostracized wrote:
Does ${pre_exec} work in conky v1.10 yet?

No. ${pre_exec} literally parses into text. That was one needed change to simply exec. And I don't see the advantage of using pre if the execution is not on an interval anyway? Apparently pre_exec was removed quite a while ago.

Here are the updated variables btw: https://github.com/brndnmtthws/conky/wi ... -Variables

Oh I know what ${pre_exec} does I use it a lot since I turn my computer off every night and some conky commands do not need to be updated at all during it's run time.

Two such examples - four really

Code: Select all

15/01/86: ${color1}${pre_exec conkyDateDiff 19860115}${goto 305}${color5}${pre_exec conkyDaysDiff 19860115}${color}
04/07/78: ${color1}${pre_exec conkyDateDiff 19780704}${goto 305}${color5}${pre_exec conkyDaysDiff 19780704}${color}


as seen in a terminal, they count time by date and days:

Code: Select all

 17 Aug 16 @ 14:01:46 ~
  $ conkyDateDiff 19860115
30 yrs 7 mths 2 days
 
 17 Aug 16 @ 14:01:48 ~
  $ conkyDaysDiff 19860115
11172
 
 17 Aug 16 @ 14:02:01 ~
  $

don't need to update once conky is running. With conky v1.10 I have to change a LOT of pre_exec commands to ${execi 86400} which, in my mind, means conky is still checking the clock to see if it needs updating - therefore using a bit (tiny I know) of CPU resources to do that ... but as I said: I have a lot. Normally with 14 conkys running and everything else idle my cpu usage is around 4-5%. That 10 you see above is because I have firefox, medit and claws_mail open as well.
Using: BunsenLabs based on Debian Stable.
Conky PitStop

ostracized
Level 4
Level 4
Posts: 230
Joined: Tue Jun 14, 2016 11:46 pm

Re: Conky Showoff thread

Postby ostracized » Wed Aug 17, 2016 11:47 pm

Sector11 wrote:RE: ${cpu} - ${cpu cpu0} = average

I should've said that I already understand you and there's no need to explain...I just found it odd that no one seemed to have noticed that in the Lua script for what...at least 7+ years?

Also, I would be cautious about using the word "average" here because that might get taken out of context and just use "total cpu usage" instead (per the old variable page on SF.)
$cpu = ${cpu cpu0} = "total cpu utilization of the system" = "mean value among all cores of the system"
...I would think a more "meaningful" use of the word "average" would be the load average figures that everyone is used to.

With conky v1.10 I have to change a LOT of pre_exec commands to ${execi 86400}


I still don't understand why you simply can't replace it with exec in those instances versus putting it on a long interval with execi. That's what I did in the latest config on line 84: ${color 0ABFFF}OS:$color${alignr}${exec cat /etc/issue.net} $machine
More potential resources? My understanding is that pre_exec ran before elements got painted and exec runs during the painting. Although I did see a reference for execp to be re-evaluated when Conky "loops"...whatever that means.

ostracized
Level 4
Level 4
Posts: 230
Joined: Tue Jun 14, 2016 11:46 pm

Re: Conky Showoff thread

Postby ostracized » Thu Aug 18, 2016 7:40 am

ostracized wrote:I don't know what the awk syntax is to omit $1, $2, and $4, show $3, and THEN show the rest of the (complete) line.

I figured out how to solve this. awk '{print $3,(substr($0,24))}' -- that gives you the timestamp and then the relevant log line without the full date and your hostname (which you obviously know.) Because your hostname is different, change '24' to the number of characters at the beginning of each line in syslog before relevant log text is outputted (mine starts with character #24 in every line.)

I would still like to color the timestamp for easier readability and use execpi to insert Conky color variables right into awk, but apparently something like this isn't working for me: ${execpi 5 tail -n4 /var/log/syslog | awk '{${color yellow}print $3${color},(substr($0,23))}' | fold -s43} and I can't find a lot of execpi examples out there...

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby Sector11 » Thu Aug 18, 2016 9:24 am

ostracized wrote:Also, I would be cautious about using the word "average" here because that might get taken out of context and just use "total cpu usage" instead (per the old variable page on SF.)
$cpu = ${cpu cpu0} = "total cpu utilization of the system" = "mean value among all cores of the system"
...I would think a more "meaningful" use of the word "average" would be the load average figures that everyone is used to.

OK, you're right man page says "total" :)

but 9%+11%+9% = 30% and ${cpu} would report 10% - it looks like average to me. :wink:

I'll use total from now on ;)
ostracized wrote:
With conky v1.10 I have to change a LOT of pre_exec commands to ${execi 86400}


I still don't understand why you simply can't replace it with exec in those instances versus putting it on a long interval with execi. That's what I did in the latest config on line 84: ${color 0ABFFF}OS:$color${alignr}${exec cat /etc/issue.net} $machine
More potential resources? My understanding is that pre_exec ran before elements got painted and exec runs during the painting. Although I did see a reference for execp to be re-evaluated when Conky "loops"...whatever that means.

Well, back to the man page: (bold is mine)
exec command
Executes a shell command and displays the output in conky. warning: this takes a lot more resources than other variables. I'd recommend coding wanted behaviour in C and posting a patch.


"loop" I think, may refer to "update_interval". Not 100% sure though.
Using: BunsenLabs based on Debian Stable.
Conky PitStop

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby Sector11 » Thu Aug 18, 2016 9:33 am

@ ostracized

RE: awk I'm horrible with awk and sed commands. But you can use conky commands with sed:

The centre calendar:

Code: Select all

${goto 175}${execpi 900 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color}/' | sed ':a;N;$!ba;s/\n/\n${goto 175}/g'}${color}

Image
Good luck
Using: BunsenLabs based on Debian Stable.
Conky PitStop

ostracized
Level 4
Level 4
Posts: 230
Joined: Tue Jun 14, 2016 11:46 pm

Re: Conky Showoff thread

Postby ostracized » Thu Aug 18, 2016 11:06 am

Sector11 wrote:

Code: Select all

${execpi 900 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color}/' | sed ':a;N;$!ba;s/\n/\n${goto 175}/g'}${color}



That was the single example I've found. And after further testing I believe I've found the answer. In order to combine awk and print and force Conky to parse its own variables, there needs to be some degree of separation so arguments get passed to execpi as literal strings, in my case quotation marks are needed (tick marks are not a substitute):

awk '{print "${color 0ABFFF}"$3"$color",(substr($0,23))}'

...that finally did it. My guess that print was evaluated before execpi, probably errors, and passes nothing to execpi. However in the above instance, the literal string, "${color 0ABFFF}+[$3 eval]+$color" is passed to execpi, and that's why it works. Sed probably works in your instance because that color variable isn't "evaluated" before it's passed as an implicit regex string.

ostracized
Level 4
Level 4
Posts: 230
Joined: Tue Jun 14, 2016 11:46 pm

Re: Conky Showoff thread

Postby ostracized » Thu Aug 18, 2016 11:45 am

Sector11 wrote:"loop" I think, may refer to "update_interval". Not 100% sure though.


You're right. Confirmed on my box that ${execp sensors|grep 'Core 1'|cut -c18-24} updates every second -- the update interval in my config.

Wanna know some bad news? This also applies to our newly talked-about execpi variable as well, regardless of what execpi's interval is set at.

If I'm not mistaken (I am), if you also have update_interval 1 in your config, then your statement,

Code: Select all

${execpi 900 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color}/' | sed ':a;N;$!ba;s/\n/\n${goto 175}/g'}${color}
...is evaluated every second, not 900. :|
edit: bug probably due to not properly restarting Conky.
Last edited by ostracized on Thu Aug 18, 2016 4:15 pm, edited 2 times in total.

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby Sector11 » Thu Aug 18, 2016 12:35 pm

ostracized wrote:
Sector11 wrote:"loop" I think, may refer to "update_interval". Not 100% sure though.


You're right. Confirmed on my box that ${execp sensors|grep 'Core 1'|cut -c18-24} updates every second -- the update interval in my config.

Wanna know some bad news? This also applies to our newly talked-about execpi variable as well, regardless of what execpi's interval is set at.

If I'm not mistaken, if you also have update_interval 1 in your config, then your statement,

Code: Select all

${execpi 900 LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color5}&${color}/' | sed ':a;N;$!ba;s/\n/\n${goto 175}/g'}${color}
...is evaluated every second, not 900. :|


@ ostracized
One right for me - one right for you. We're doing well.

I have a couple of conkys here that have a LOT of ${execpi ...} commands I think I'll test.

And I'll leave this with you regarding 'sensors', Using Sensors, just because mrpeachy did a wonderful job with it.
Using: BunsenLabs based on Debian Stable.
Conky PitStop

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby Sector11 » Thu Aug 18, 2016 12:37 pm

@ ostracized
One right for me - one right for you. We're doing well.

I have a couple of conkys here that have a LOT of ${execpi ...} commands I think I'll test.
${execpi 1 ...}
${execpi 10 ...}
${execpi 1000 ...}
${execpi 86400 ...}

and see how each affect the CPU usage.
EDIT: Back later with results

= = = = =
And I'll leave this with you regarding 'sensors', Using Sensors, just because mrpeachy did a wonderful job with it.[/quote]
Last edited by Sector11 on Thu Aug 18, 2016 12:39 pm, edited 1 time in total.
Using: BunsenLabs based on Debian Stable.
Conky PitStop

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby Sector11 » Thu Aug 18, 2016 12:37 pm

Saving CPU Resources in Conky

And the results are in ... a conky using update_interval 1 (unchanged during the test) with 50 x ${pre_exec ...} commands had a little CPU usage section added at the bottom ... like this:

Code: Select all

${color6}${membar 0,42}${color5} BunsenLabs Hydrogen (Jessie) ${color6}${membar 0}${color}
  RC1  09/09/15: ${color1}${pre_exec conkyDateDiff 20150909}${goto 305}${color5}${pre_exec conkyDaysDiff 20150909}${color}
  RC2  16/02/16: ${color1}${pre_exec conkyDateDiff 20160216}${goto 305}${color5}${pre_exec conkyDaysDiff 20160216}${color}

${color1}${swapbar 0}${color}
pre_exec x50 updates @ 1 second

${alignc}${color5}CPU %
${alignc}${color6}Total:${color} ${if_match ${cpu cpu0} < 10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100} ${cpu cpu0}\
${else}${color9}${cpu cpu0}${color}${endif}${endif}
${alignc}${color5}${swapbar 0,20}
${alignc}| ${color6}1${color} ${if_match ${cpu cpu1} < 10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100} ${cpu cpu1}\
${else}${color9}${cpu cpu1}${color}${endif}${endif} | \
${alignc}${color6}2${color} ${if_match ${cpu cpu2} < 10}  ${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100} ${cpu cpu2}\
${else}${color9}${cpu cpu2}${color}${endif}${endif} | \
${alignc}${color6}3${color} ${if_match ${cpu cpu3} < 10}  ${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100} ${cpu cpu3}\
${else}${color9}${cpu cpu3}${color}${endif}${endif} |
${color1}${swapbar 0}${color}


Started with pre_exec = Total 1% Image

Changed to exec = Total 19% image

Changed to execpi 1 = Total 19% image

Changed to execpi 10 = Total 1% (when execpi is NOT updating, ie seconds 1 to 9) image

Changed to execpi 10 = Total 11% (when execpi is updating, ie 10th second) image

Changed to execpi 86400= 1% image

So I guess that pretty well answers that question. :)

My conky has been returned to 50x ${pre_exec ...} commands. although ${execpi 86400} would do the same.

Did not test with execi ... since I thought parsing would draw more resources.
Using: BunsenLabs based on Debian Stable.
Conky PitStop

ostracized
Level 4
Level 4
Posts: 230
Joined: Tue Jun 14, 2016 11:46 pm

Re: Conky Showoff thread

Postby ostracized » Thu Aug 18, 2016 3:54 pm

Sector11 wrote:Changed to execpi 10 = Total 1% (when execpi is NOT updating, ie seconds 1 to 9) image
Changed to execpi 10 = Total 11% (when execpi is updating, ie 10th second) image


Ok, well I swear this code was updating every second as every syslog entry was painted every second:
${execpi 90 tail -n4 /var/log/syslog | awk '{print "${color 0ABFFF}"$3"$color",(substr($0,23))}' | fold -s43}
...and now I can't reproduce it :lol: (aka, it's now on the correct 90 second interval) because that side-effect might have been the result of saving the Conky config file in-place instead of properly restarting Conky after saving the config. :shock:

Here's the variable page again:
Configuration Variables wrote:execpi
Same as execp, but with an interval. Note that the output from the $execpi command is still parsed and evaluated at every interval.

...I took "every interval" as being the update_interval versus execpi's interval because I was experiencing odd behavior updating every second.

Interesting results on your end. Why would exec take up so many resources on its own if it's not supposed to be doing anything after a first round? I would like to see limited testing for execi though or would it be roughly similar to execpi?

Let's talk about something else...wanna know the current UTC time (in red) without doing ${color red}${utime %H:%M:%S}?
Well here you go: ${execp date -u '+${color red}%H:%M:%S'} Everyone should quickly reference UTC. :D

Good night and thanks for the insight.

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby Sector11 » Thu Aug 18, 2016 7:07 pm

ostracized wrote:Interesting results on your end. Why would exec take up so many resources on its own if it's not supposed to be doing anything after a first round? I would like to see limited testing for execi though or would it be roughly similar to execpi?

Who says "it's not supposed to be doing anything after a first round?" It updates at every update_interval that's why the warning that it is hard on resources.

execi should be the same as execpi except it will not 'parse' commands. Will test tomorrow with the same conky I did before. Now it's wife time.

ostracized wrote:Let's talk about something else...wanna know the current UTC time (in red) without doing ${color red}${utime %H:%M:%S}?
Well here you go: ${execp date -u '+${color red}%H:%M:%S'} Everyone should quickly reference UTC. :D

Good night and thanks for the insight.


I like using the "date" command in conky and use it in quite a few of Teo's weather scripts.

BTW: execp comes with the same warning as exec
execp command
...[snip] warning: this takes a lot more resources than other variables. I'd recommend coding wanted behaviour in C and posting a patch. [snip]...

So why would you use a CPU heavy resource ${execp ...} call for UTC when conky has a lightweight command built in? I know you know it, I see it above.

However if it's just to show date then: KUDOS with one OOPS!
Your command leaves everything after the UTC time red so you still need the ${color} command.

Which brings my 'test conky' into action... everyone should have a test.conky.
Image
I prefer orangered to straight red myself.

= = = = =
Did you know you can kill just one conky - for example my test.conky seen above - without killing the other conkys?
Image
Using: BunsenLabs based on Debian Stable.
Conky PitStop

ostracized
Level 4
Level 4
Posts: 230
Joined: Tue Jun 14, 2016 11:46 pm

Re: Conky Showoff thread

Postby ostracized » Fri Aug 19, 2016 2:05 am

Sector11 wrote:Who says "it's not supposed to be doing anything after a first round?" It updates at every update_interval that's why the warning that it is hard on resources.

Ok that's something I seriously didn't know and isn't documented either...like the way execp is (other than that vague warning about using extra resources.) Now I finally understand why you use pre_exec. That should almost warrant a bug report to make documentation more clearer in my mind.

So why would you use a CPU heavy resource ${execp ...} call for UTC when conky has a lightweight command built in?

I was just playing around to see what was possible in execp.

Your command leaves everything after the UTC time red so you still need the ${color} command.

Sometimes I'm pretty lazy about closing tags if the new line is going to change the color anyway. For example:

Code: Select all

${color 0ABFFF}UTC:$alignr${color orange}${utime %T}
${color 0ABFFF}Kernel:$color$alignr$kernel
...it may break convention but the closing color tag isn't needed in the first line here.

Did you know you can kill just one conky - for example my test.conky seen above - without killing the other conkys?

xkill and then click on the specific window you want killed? Is that advisable to "kill" conky windows instead of "ending" them, or would it really not matter? Btw instead of doing xkill in terminal, there's a convenient "force quit" item you can add to MATE panels which I believe does the same thing as xkill:
fq.png

ostracized
Level 4
Level 4
Posts: 230
Joined: Tue Jun 14, 2016 11:46 pm

Re: Conky Showoff thread

Postby ostracized » Fri Aug 19, 2016 4:19 am

Btw Sector11, I've been looking over some of the weather conky's...many of them use wget to fetch unencrypted data from sources like moongiant and accuweather. Again I would advise caution fetching data from unencrypted data sources considering the tcp exploitability talk going on recently. And seeing how easy it was to spoof usatoday (by not even having a MitM), I don't see how weather sites couldn't be affected as well. Yes, this is mostly server-side related and yes there is a patch coming to desktop environments, but it still underscores the importance of fetching from secure data sources.

Kinda reminds me of win7 gadgets. MS abruptly stopped updating them in 2012 and casted a blanket statement of, "don't use gadgets anymore because they're all vulnerable", but that didn't stop people from using them en masse -- even to this day. And like your weather conkys, the vast majority of "internet connected" ones are also fetching plain-text data -- and those requests can easily be spoofed at the coffee shop and injected code can be served back instead of "your 3-day forecast." This was demonstrated many years ago at defcon.

Not a huge issue to be concerned about on Linux, but something to be definitely on the back burner.

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby Sector11 » Fri Aug 19, 2016 10:37 am

First off, I'm enjoying our interactions about things conky. Thank you.
ostracized wrote:Now I finally understand why you use pre_exec. That should almost warrant a bug report to make documentation more clearer in my mind.

${click light on}

And something that should be included in v1.10, IMHO. BTW, the link you used to show that pre_exec was depreciated was in Brandon's pre-release of conky version 2.0 - that never really made it to the mainstream. I was hoping by the time v2 came out it would be included (v2 became v1.10). But I'm sure you know that.

Another thing I do not like about v1.10 is: It's slower to load than v1.90

I was just playing around to see what was possible in execp.

Ahhhhh the secret ingredient of life the universe and everything - 'play with', 'test', 'try', 'experiment'

exec - the base
execp - does 'everything' exec does plus 'parsing'
execi - does everything exec does but at specific intervals
execpi - does everything execi does plus the parsing of output

Sometimes I'm pretty lazy about closing tags if the new line is going to change the color anyway. For example:

Code: Select all

${color 0ABFFF}UTC:$alignr${color orange}${utime %T}
${color 0ABFFF}Kernel:$color$alignr$kernel
...it may break convention but the closing color tag isn't needed in the first line here.

Yea, I do that too. I just wanted to point it out. For a reason...

I have some bash scripts here that uses ${execp(i) ...} to run them because there are conky commands in the bash scripts for ${font ..} and ${color ...}. And in some, neither command has a closing counterpart in the script so at first they required:

Code: Select all

${execpi 600 /path/to/bash_script}${font}${color}
until I tweaked them. :mrgreen:

A question. Why not use the color0 color1 color2 etc variables above TEXT?

To continue ...
Also - a long time ago I got into the habit of using ${} with all conky commands. The creator of "conkyForecast" demonstrated one day where $command can fail in certain instances. So I changed habits. Just a little something to know if you ever run into that situation. I have kicked my butt for years for not documenting exactly what it was. :(

xkill and then click on the specific window you want killed? Is that advisable to "kill" conky windows instead of "ending" them, or would it really not matter?

No, pkill It's something a friend came up with years ago over on the ubuntu forum:

Code: Select all

pkill -xf "conky -q -c /media/5/Conky/test.conky" &

as long as what is between the " " is exactly the way you started the conky.
Put it in a bash script:

Code: Select all

#!/bin/bash
   pkill -xf "conky -q -c /media/5/Conky/test.conky" &
exit 0

and bob's your uncle. I have that as a command in my OpenBox menu: Image
R: run E: edit K: Kill | KFC = Kentucky Fried Conky - kills them all!

I'm not a MATE user I use BunsenLabs - Debian8/OpenBox :)

To kill or end I don't think it matters ... but looking at the conky man page it's: kill
You Should Know

Conky is generally very good on resources. That said, the more you try to make Conky do, the more resources it is going to consume.

An easy way to force Conky to reload your ~/.conkyrc: "killall -SIGUSR1 conky". Saves you the trouble of having to kill and then restart. You can now also do the same with SIGHUP.

For me: killall conky && conky does the same thing as above.

Will continue with next post later - today is my anniversary so I need some wife time. :)

--- wget stuff looks interesting
Using: BunsenLabs based on Debian Stable.
Conky PitStop

User avatar
Todd Sauve
Level 2
Level 2
Posts: 84
Joined: Tue Oct 20, 2015 11:36 pm
Location: Calgary, Alberta

Re: Conky Showoff thread

Postby Todd Sauve » Fri Aug 19, 2016 11:11 am

OK, here is my 4 core conky. It is the same as my 8 core conky, except for 4 fewer cores and because it uses the Intel integral Graphics 3000 GPU I have removed all the GPU info, since it is the same as the cores. It only shows the temperature, so there is no point in including it. This a very nice looking and informative conky for laptops or any 4 core PC.

Simply change the name of the hard drive to reflect your hardware.

Code: Select all

conky.config = {
   background = false,
   update_interval = 1,

   cpu_avg_samples = 2,
   net_avg_samples = 2,
   temperature_unit = 'celsius',

   double_buffer = true,
   no_buffers = true,
   text_buffer_size = 2048,

   gap_x = 30,
   gap_y = 60,
   minimum_width = 280, minimum_height = 460,
   maximum_width = 280,
   own_window = true,
   own_window_class = 'conky',
   own_window_argb_visual = true,
   own_window_argb_value = 120,
   own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    own_window_transparent = true,
   background = false,
   border_inner_margin = 0,
   border_outer_margin = 0,
   alignment = 'bottom_right',

   draw_shades = false,
   draw_outline = false,
   draw_borders = false,
   draw_graph_borders = false,

   override_utf8_locale = true,
   use_xft = true,
   font = 'DejaVu Sans:size=10',
   xftalpha = 0.5,
   uppercase = false,

   default_color = 'white',
        color1 = 'cyan',
        color2 = 'white',


};

conky.text = [[
${goto 5}${font zekton:style=Bold:pixelsize=14}${color2}SYSTEM${font  Snap.se:size=8} ${color1}${hr}${color}

${goto 10}${font OpenLogos:size=12}J${font}   OS: ${execi 10800 cat /etc/issue.net}
${goto 10}${font StyleBats:size=12}q${font}   Kernel: ${kernel}
${goto 10}${font StyleBats:size=12}x${font}   CPU: ${execi 86400 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c -5} \
${execi 86400 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 19-26}

${goto 5}${font zekton:style=Bold:pixelsize=14}${color2}SYSTEM LOAD${font  Snap.se:size=8} ${color1}${hr}${color}
${voffset -5}
${goto 10}${font StyleBats:size=12}A${font}  CPU 1: ${cpu cpu 0}%${goto 120}    ${execi 5 sensors|grep 'Core 0'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'} °C ${alignr}${freq 1} MHz
${goto 5}${color1}${cpubar cpu 0}${color}
${goto 10}${font StyleBats:size=12}A${font}  CPU 2: ${cpu cpu 1}%${goto 120}    ${execi 5 sensors|grep 'Core 1'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'} °C ${alignr}${freq 2} MHz
${goto 5}${color1}${cpubar cpu 1}${color}
${goto 10}${font StyleBats:size=12}A${font}  CPU 3: ${cpu cpu 2}%${goto 120}    ${execi 5 sensors|grep 'Core 2'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'}  ${alignr}${freq 3} MHz
${goto 5}${color1}${cpubar cpu 2}${color}
${goto 10}${font StyleBats:size=12}A${font}  CPU 4: ${cpu cpu 3}%${goto 120}    ${execi 5 sensors|grep 'Core 3'| awk -F'+' '{print $2}' | awk -F'.' '{print $1}'}  ${alignr}${freq 4} MHz
${goto 5}${color1}${cpubar cpu 3}${color}
${voffset -5}
${goto 10}${font StyleBats:size=12}g${font}  RAM  $mem / $memmax ($memperc%)
${goto 32}${color1}${membar 5,230}${color}
${voffset -5}
${goto 10}${font conkycolors:size=12}i${font} ${voffset -5} HOME:  ${fs_used /} / ${fs_size /}
${goto 32}${color1}${fs_bar 5,230}${color}
${voffset -5}
${goto 10}${font conkycolors:size=12}l${font}${voffset -6}${goto 32}Kingston SSD: R/W: ${diskio}
${voffset -5}

]];


Screenshot from 2016-08-17 15-04-04.jpg

User avatar
trytip
Level 5
Level 5
Posts: 859
Joined: Tue Jul 05, 2016 1:20 pm

Re: Conky Showoff thread

Postby trytip » Wed Aug 24, 2016 4:07 pm

Image

took me a while to configure this weather conky using the https://satya164.deviantart.com/art/Con ... -366545753 which has stopped working a few time because of https://query.yahooapis.com ... this one uses curl getting data from https so i'm not worried about any exploits

for me the wget ip address always chokes the conky. so if i enable one that is using the wget code for ip lookup it hangs and i have to kill a couple of time to get it kick started

i don't do much playing around with conky unless i notice a small imperfection. sifting through these long conky codes can get tiresome especially the weather one
Last edited by trytip on Wed Aug 24, 2016 7:22 pm, edited 3 times in total.
I love Windows, they give my walls personality.

ostracized
Level 4
Level 4
Posts: 230
Joined: Tue Jun 14, 2016 11:46 pm

Re: Conky Showoff thread

Postby ostracized » Wed Aug 24, 2016 4:53 pm

trytip wrote:i don't do much playing around with conky unless i notice a small imperfection. sifting through these long conky codes can get tiresome especially the weather one


That's why I'm not really interested in weather configs because you're really at the mercy of "free weather API services." It's a shame that the MATE weather report panel recently broke because "changes" apparently happened over on weather.gov as well. I see Yahoo as...really far gone with Mayer at the helm so I would really advocate looking at other sources because I would think that they're just going to change the API again in a month or else put very little effort into it, like Yahoo Answers.

For the devs, I would look into a more developed weather API service like https://forecast.io/ -- you need an account there to make calls but the API documentation is very much super-par.

User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Postby Sector11 » Wed Aug 24, 2016 5:54 pm

RE: Weather in conky

Or you could take a look at » Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant). Teo is excellent at staying on top of things. The following is a combination of two of the scripts.
Image
Using: BunsenLabs based on Debian Stable.
Conky PitStop


Return to “Compiz, Conky, Docks, & Widgets”