Conky Showoff thread

Forum rules
Before you post please read how to get help
User avatar
Sector11
Level 3
Level 3
Posts: 175
Joined: Mon Nov 22, 2010 10:33 am

Re: Conky Showoff thread

Post by Sector11 » Sun Jul 31, 2016 12:19 am

If you have 'inxi' installed you can get your Graphics card info from that:

Code: Select all

 
 31 Jul 16 @ 00:46:07 ~
  $ inxi -G
Graphics:  Card: NVIDIA GT218 [GeForce 210]
           Display Server: X.Org 1.16.4 driver: nvidia Resolution: 1920x1080@60.00hz
           GLX Renderer: GeForce 210/PCIe/SSE2 GLX Version: 3.3.0 NVIDIA 340.93
 
 31 Jul 16 @ 00:46:22 ~
  $ inxi -G | grep 'Card:' | cut -c 17-
 NVIDIA GT218 [GeForce 210]
and also harddrive info:

Code: Select all

 31 Jul 16 @ 01:05:13 ~
  $ inxi -D
Drives:    HDD Total Size: 500.1GB (21.3% used) ID-1: /dev/sda model: WDC_WD5000AAKX size: 500.1GB
... so you can grep/sed what you want.

Also conky has some built in 'nvidia' commands ... my old card doesn't get it all but it gets enough to keep me happy.

Also if you are going to use 'cat' to get the OS may as well use it to get the CPU you have as well:

Code: Select all

    OS: ${pre_exec cat /etc/issue.net}
Kernel: ${kernel}
   CPU: ${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c -10} \
${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 16-24}


--- GETS EVERY INSTANCE:
${pre_exec cat /proc/cpuinfo | grep 'model name' | cut -c 13-37}

--- TRIM IT BACK TO ONLY ONCE
   CPU: ${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq}

--- 'CUT' THE INFO YOU WANT TO SHOW:
   CPU: ${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c -10} \
${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 16-24}


--- THIS IS NICE STUFF - Thank you Todd:
   GPU: ${pre_exec inxi -G | grep 'Card:' | cut -c 18-}: ${nvidia temp}°
 Mem Used: ${execi 5 nvidia-settings -q [gpu:0]/UsedDedicatedGPUMemory -t} of \
${pre_exec nvidia-settings -q [gpu:0]/TotalDedicatedGPUMemory -t} MB

These are native conky commands:

    GPU Temperature: ${nvidia temp}°
       GPU slows at: ${nvidia threshold}°
Ambient Temperature: ${nvidia ambient}
      GPU Frequency: ${nvidia gpufreq}
   Memory Frequency: ${nvidia memfreq}
      Image Quality: ${nvidia imagequality}
Image

Actually INXI will give you a lot to play with ... even weather:

Code: Select all

 31 Jul 16 @ 01:05:20 ~
  $ s11
System:    Host: bunsen Kernel: 3.16.0-4-amd64 x86_64 (64 bit gcc: 4.8.4) Desktop: Openbox 3.5.2 dm: lightdm
           Distro: BunsenLabs 8.5 bunsen-hydrogen
Machine:   Mobo: ECS model: MCP61M-M3 v: 7.0 Bios: American Megatrends v: 080015 date: 11/03/2010
CPU:       Triple core AMD Athlon II X3 450 (-MCP-) cache: 1536 KB
           flags: (lm nx sse sse2 sse3 sse4a svm) bmips: 19286
           Clock Speeds: 1: 3200 MHz 2: 2000 MHz 3: 2000 MHz
Graphics:  Card: NVIDIA GT218 [GeForce 210] bus-ID: 02:00.0 chip-ID: 10de:0a65
           Display Server: X.Org 1.16.4 driver: nvidia Resolution: 1920x1080@60.00hz
           GLX Renderer: GeForce 210/PCIe/SSE2 GLX Version: 3.3.0 NVIDIA 340.93 Direct Rendering: Yes
Audio:     Card-1 NVIDIA MCP61 High Definition Audio driver: snd_hda_intel bus-ID: 00:05.0 chip-ID: 10de:03f0
           Card-2 NVIDIA High Definition Audio Controller
           driver: snd_hda_intel bus-ID: 02:00.1 chip-ID: 10de:0be3
           Sound: Advanced Linux Sound Architecture v: k3.16.0-4-amd64
Network:   Card: NVIDIA MCP61 Ethernet driver: forcedeth port: d480 bus-ID: 00:07.0 chip-ID: 10de:03ef
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 500.1GB (21.3% used)
           ID-1: /dev/sda model: WDC_WD5000AAKX size: 500.1GB serial: WD-WCC2EMF62817
Partition: ID-1: / size: 20G used: 5.8G (32%) fs: ext4 dev: /dev/sda8
           ID-2: /media/5 size: 197G used: 65G (35%) fs: ext4 dev: /dev/sda5
           ID-3: /media/2-CBH size: 20G used: 3.4G (18%) fs: ext4 dev: /dev/sda2
           ID-4: /media/1-CBR size: 20G used: 7.6G (41%) fs: ext4 dev: /dev/sda1
           ID-5: /media/6R size: 20G used: 4.1G (22%) fs: ext4 dev: /dev/sda6
           ID-6: /media/10 size: 142G used: 5.0G (4%) fs: ext4 dev: /dev/sda10
           ID-7: /media/7H size: 20G used: 3.6G (20%) fs: ext4 dev: /dev/sda7
           ID-8: /home size: 20G used: 3.7G (20%) fs: ext4 dev: /dev/sda9
           ID-9: swap-1 size: 2.15GB used: 0.00GB (0%) fs: swap dev: /dev/sda3
Sensors:   System Temperatures: cpu: 42.0C mobo: 31.5C gpu: 0.0:45C
           Fan Speeds (in rpm): cpu: 2092 fan-2: 0 fan-3: 0
Weather:   Conditions: 57 F (14 C) - Mostly Cloudy Wind: From the ESE at 8 MPH Humidity: 48%
           Pressure: 29.95 in (1014 mb) Time: July 31, 1:11 AM ART (America/Argentina/Buenos_Aires)
Info:      Processes: 160 Uptime: 15:04 Memory: 805.0/5985.6MB
           Init: systemd v: 215 runlevel: 5 Gcc sys: 4.9.2 alt: 4.8
           Client: Shell (bash 4.3.301 running in /usr/bin/termin) inxi: 2.1.28
 
 31 Jul 16 @ 01:11:15 ~
  $ 
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

Post by Sector11 » Sun Jul 31, 2016 12:21 am

trytip wrote:If anyone has the code to show the fan speed in RPMs for an Nvidia card please post it for me. All I can find is the percentage code.
I'm going hunting to see if I can find it.
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

Post by Todd Sauve » Sun Jul 31, 2016 8:54 am

Sector11 wrote:
trytip wrote:If anyone has the code to show the fan speed in RPMs for an Nvidia card please post it for me. All I can find is the percentage code.
I'm going hunting to see if I can find it.
Thanks Sector11! You are a gentleman and a scholar, as most of my fellow Canadians are! 8) :lol:

Unfortunately, the code you wrote to detect the CPU doesn't work. :(

CPU: ${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c -10} \
${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 16-24}

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

Re: Conky Showoff thread

Post by Sector11 » Sun Jul 31, 2016 10:36 am

Todd Sauve wrote:Thanks Sector11! You are a gentleman and a scholar, as most of my fellow Canadians are! 8) :lol:

Unfortunately, the code you wrote to detect the CPU doesn't work. :(

Code: Select all

CPU: ${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c -10} \
${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 16-24}
Just trying to help.

RE: ${pre_exec ...} vs ${execi 86400 ...}
I'm using conky v1.9 you are using conky v1.10
You don't have the ${pre_exec cat ...} command in that version of conky ... {hopefully} YET!
Change it to: ${execi 86400 cat...} and it will update once a day ... no sense in wasting CPU cycles updating it more often.

Also each "cat" call (where's Batman?) is a different length depending on the CPU. Recommend doing all the ground work in a terminal:

Code: Select all

 31 Jul 16 @ 11:10:35 ~
  $ cat /proc/cpuinfo | grep 'model name'
model name	: AMD Athlon(tm) II X3 450 Processor
model name	: AMD Athlon(tm) II X3 450 Processor
model name	: AMD Athlon(tm) II X3 450 Processor
 
 31 Jul 16 @ 11:10:50 ~
  $ cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq
AMD Athlon(tm) II X3 450 Processor
 
 31 Jul 16 @ 11:12:53 ~
  $ cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c -10
AMD Athlon
 
 31 Jul 16 @ 11:13:24 ~
  $ cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 16-24
II X3 450
 
 31 Jul 16 @ 11:13:47 ~
  $ 
As you see with the last two lines, I split the output into two calls to edit out the "(tm)". Script foo gurus out there could probably eliminate that second call and do it in one command ... but I'm not a script foo guru. :)
and in my conky:

Code: Select all

   CPU: ${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c -10} \
${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 16-24}
cat, grep, sed, cut and possibly fold commands are a blessing and a curse ... man pages are a blessing and my friend.
Last edited by Sector11 on Sun Jul 31, 2016 10:52 am, 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

Post by Sector11 » Sun Jul 31, 2016 10:50 am

@ trytip...

No matter where I go all I see is % for Nvidia GPU fan speeds.

Some examples: Nvidia GPU Coolness
- my old stomping grounds: Automatically adjust Nvidia GPU fan speed - nice bash script.
- and if the ARCH Wiki only talks % values for the cards: NVIDIA/Tips and tricks, I think I'm safe in saying:

That's it folks: Nvidia GPU fan Speed are in % only not RPM
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

Post by Todd Sauve » Sun Jul 31, 2016 11:26 am

Sector11 wrote:
Todd Sauve wrote:Thanks Sector11! You are a gentleman and a scholar, as most of my fellow Canadians are! 8) :lol:

Unfortunately, the code you wrote to detect the CPU doesn't work. :(

Code: Select all

CPU: ${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c -10} \
${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 16-24}
Just trying to help.

RE: ${pre_exec ...} vs ${execi 86400 ...}
I'm using conky v1.9 you are using conky v1.10
You don't have the ${pre_exec cat ...} command in that version of conky ... {hopefully} YET!
Change it to: ${execi 86400 cat...} and it will update once a day ... no sense in wasting CPU cycles updating it more often.

Also each "cat" call (where's Batman?) is a different length depending on the CPU. Recommend doing all the ground work in a terminal:

Code: Select all

 31 Jul 16 @ 11:10:35 ~
  $ cat /proc/cpuinfo | grep 'model name'
model name	: AMD Athlon(tm) II X3 450 Processor
model name	: AMD Athlon(tm) II X3 450 Processor
model name	: AMD Athlon(tm) II X3 450 Processor
 
 31 Jul 16 @ 11:10:50 ~
  $ cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq
AMD Athlon(tm) II X3 450 Processor
 
 31 Jul 16 @ 11:12:53 ~
  $ cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c -10
AMD Athlon
 
 31 Jul 16 @ 11:13:24 ~
  $ cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 16-24
II X3 450
 
 31 Jul 16 @ 11:13:47 ~
  $ 
As you see with the last two lines, I split the output into two calls to edit out the "(tm)". Script foo gurus out there could probably eliminate that second call and do it in one command ... but I'm not a script foo guru. :)
and in my conky:

Code: Select all

   CPU: ${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c -10} \
${pre_exec cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 16-24}
cat, grep, sed, cut and possibly fold commands are a blessing and a curse ... man pages are a blessing and my friend.
ARGGGHHH!

OK, I put this in the code but it shows too much info to fit on the line in the conky display. It says: CPU: Intel(R) CM) i7-477 :(

What do I need to cut out to get rid of the (R) CM) ?


${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 -10} \
${execi 86400 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 16-24}

In fact, it is probably just easier not to even try to get the code to list the CPU. I should probably just leave it the way I have it.

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

Re: Conky Showoff thread

Post by Sector11 » Sun Jul 31, 2016 12:46 pm

Todd Sauve wrote:ARGGGHHH!
What do I need to cut out to get rid of the (R) CM) ?

In fact, it is probably just easier not to even try to get the code to list the CPU. I should probably just leave it the way I have it.
:lol: :lol: yea, I know your frustration - been there; screamed out loud! :lol:

I created a file, $HOME/catintel, with the info you gave me, here's the cut values:

Code: Select all

 31 Jul 16 @ 13:31:13 ~
  $ cat catintel
Intel(R) CM) i7-477

 31 Jul 16 @ 13:31:20 ~
  $ cat catintel | cut -c -5
Intel

 31 Jul 16 @ 13:31:40 ~
  $ cat catintel | cut -c 13-
 i7-477
 
 31 Jul 16 @ 13:31:50 ~
  $ 
And yea, you are right, you can just type the info in. You could also do that for your OS, it's not going to change multiple times a day either. BUT the idea is to get conky to do the work.

This will work for you:

Code: Select all

${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 13-}
Also: IF this:
What do I need to cut out to get rid of the (R) CM) ?
is really this:
What do I need to cut out to get rid of the (R) (CM) ?
The code would be 14- not 13- in the second 'cut':

Code: Select all

${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 14-}
--- --- --- --- --- --- ---
Also just some friendly advice about forum etiquette, I'm a member here just like you so this isn't "official":

When posting code from conkys, other scripts or terminal output use the

Code: Select all

[code]code tags
[/code] it makes things easier to read.
And you really don't need to quote entire posts, although a lot of people do ... trim it back a bit. It might only be a few bits, but every little 'bit' and 'byte' saved helps the server serve better.
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

Post by Todd Sauve » Sun Jul 31, 2016 1:15 pm

Thanks Sector11!

Now there is just one more little detail. There is a redundant "CPU" at the end of the line and it says CPU: Intel (TM) i7-4770K CPU. How do I get rid of the CPU at the end of the line?

Other than that, it is working perfectly now!

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

Re: Conky Showoff thread

Post by Sector11 » Sun Jul 31, 2016 3:02 pm

Todd Sauve wrote:it says CPU: Intel (TM) i7-4770K CPU. How do I get rid of the CPU at the end of the line?
You're welcome

AHA! So the CPU: Intel(R) (CM) i7-477 wasn't exact.

I changed my little file to read - adding the missing ( as well
Intel(R) (CM) i7-477K CPU
and in the terminal to get the cut right:

Code: Select all

 31 Jul 16 @ 15:50:58 ~
  $ cat catintel
Intel(R) (CM) i7-477K CPU

 31 Jul 16 @ 15:51:06 ~
  $ cat catintel | cut -c -5
Intel
 
 31 Jul 16 @ 15:51:16 ~
  $ cat catintel | cut -c 14-
 i7-477K CPU
 
 31 Jul 16 @ 15:51:45 ~
  $ cat catintel | cut -c 14-19
 i7-47
 
 31 Jul 16 @ 15:52:56 ~
  $ cat catintel | cut -c 14-20
 i7-477
 
 31 Jul 16 @ 15:53:01 ~
  $ cat catintel | cut -c 14-21
 i7-477K
 
 31 Jul 16 @ 15:53:06 ~
  $ 
Sooooo ... the second call would be:

Code: Select all

${execi 86400 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 14-21}
Check out

Code: Select all

cut --help
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

Post by Todd Sauve » Sun Jul 31, 2016 3:24 pm

OK, I don't quite get what you are driving at. When I paste your code:

${execi 86400 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 14-21}

I get: CPU: Intel (TM) i7-

But that is all it shows now. We are not communicating well on this last little bit of code, so what should it be?

I would like to get rid of the (TM) as well, if possible.

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

Re: Conky Showoff thread

Post by Sector11 » Sun Jul 31, 2016 5:42 pm

OK, but PLEASE do this: open a terminal and paste in this line, hit Enter and post the results here:

Code: Select all

cat /proc/cpuinfo | grep 'model name'
That will tell me exactly what I need

Mine:

Code: Select all

 31 Jul 16 @ 18:44:48 ~
  $ cat /proc/cpuinfo | grep 'model name'
model name	: AMD Athlon(tm) II X3 450 Processor
model name	: AMD Athlon(tm) II X3 450 Processor
model name	: AMD Athlon(tm) II X3 450 Processor
 
 31 Jul 16 @ 18:44:53 ~
  $ 
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

Post by Todd Sauve » Sun Jul 31, 2016 6:10 pm

OK, here's what it says:

todd@todd-All-Series ~ $ cat /proc/cpuinfo | grep 'model name'
model name : Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
model name : Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
model name : Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
model name : Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
model name : Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
model name : Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
model name : Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
model name : Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz

And now I have to go to bed for a while--I'm beat!!!

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

Re: Conky Showoff thread

Post by Sector11 » Sun Jul 31, 2016 7:00 pm

Thank you ... try this:

Code: Select all

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}
You should see:

Code: Select all

CPU: Intel i7-4770K
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

Post by Todd Sauve » Mon Aug 01, 2016 2:21 am

Thanks Sector11!

It works perfectly! :mrgreen:

User avatar
trytip
Level 6
Level 6
Posts: 1453
Joined: Tue Jul 05, 2016 1:20 pm

Re: Conky Showoff thread

Post by trytip » Wed Aug 10, 2016 7:50 pm

fun with snaps ... mint/mate 17.03

Image

Image
Image

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

Re: Conky Showoff thread

Post by Sector11 » Wed Aug 10, 2016 10:52 pm

@trytip ... what a neat idea ... let's see if we can get a chain going.

BunsenLabs 8.5
Image
With 6 conkys to stay on topic.
Last edited by Sector11 on Wed Aug 10, 2016 10:54 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

Post by Sector11 » Wed Aug 10, 2016 10:52 pm

I'm tired, please delete - double post - see above.
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

Post by ostracized » Tue Aug 16, 2016 11:56 pm

Modifying @Retic1959's choice, which is quite nice but don't really have an interest to install a "Conky Manager"...but let me know if you do and see how it works out. In my version I get rid of references to the battery since a) I'm on a desktop and b) terminal was complaining of battery acpi errors, probably due to old legacy settings.

Retic1959's link points to another mediafire link which provides you with a nice collection of configs...many of them need updating due to persistent weather API issues and new naming schemes of the network adapters in the 16.04 codebase.

Anyway his theme is the first one in the pack, "4 & 2 core blue". In that folder he's using conkyrc2core, because dual-cores are still cool. :lol:

Here are the prereqs:
1. install Lua obviously if it hasn't been installed.
2. install /fonts/Caviar_Dreams.ttf, /fonts/Caviar_Dreams_Bold.ttf, and /fonts/Radio_Space.ttf

In clock01_rings.lua, get rid of the entire battery element and make these changes (which are just basically changing around the x and y coords of 5 rings):

Code: Select all

    {
        name='cpu',
        arg='cpu0',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.3,
        fg_colour=0x0ABFFF,
        fg_alpha=0.8,
        x=152, y=323,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
    {
        name='cpu',
        arg='cpu1',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.3,
        fg_colour=0x0ABFFF,
        fg_alpha=0.8,
        x=226, y=323,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
    {
        name='fs_used_perc',
        arg='/',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0x0ABFFF,
        fg_alpha=0.8,
        x=35, y=587,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
    {
        name='memperc',
        arg='',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0x0ABFFF,
        fg_alpha=0.8,
        x=130, y=590,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=180
    },
    {
        name='swapperc',
        arg='',
        max=100,
        bg_colour=0xffffff,
        bg_alpha=0.2,
        fg_colour=0x0ABFFF,
        fg_alpha=0.8,
        x=220, y=592,
        radius=25,
        thickness=5,
        start_angle=-90,
        end_angle=172
    },
These changes in conkyrc2core:

Code: Select all

# Conky settings #
background no
update_interval 1
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
double_buffer yes
no_buffers yes
text_buffer_size 2048
temperature_unit celsius
default_color FFFFFF

# Window specifications #
own_window yes
own_window_type normal
own_window_hints below,skip_pager,skip_taskbar,sticky,undecorated
own_window_argb_visual yes
own_window_argb_value 190
border_inner_margin 0
border_outer_margin 5
minimum_size 250 300
maximum_width 250
alignment top_right
gap_x 10
gap_y 38

# Graphics settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes

# Text settings #
use_xft yes
xftfont caviar dreams:size=8
xftalpha 0.5
uppercase no

# Lua Load #
lua_load ~/.conky/clock01_rings.lua
lua_draw_hook_pre clock_rings

TEXT
# Time, date, and uptime #
${voffset 7}${font Radio Space:size=16}${color 0ABFFF}${time %A}${font}$color${font Radio Space:size=38}${goto 167}${voffset -8} ${time %e}${font}
${font Radio Space:size=18}${voffset -30}${time %b}${font}${voffset -3} ${font Radio Space:size=20}${time %Y}${font}${color 0ABFFF} ${hr 1}
${font caviar dreams bold:size=10}${goto 150}${voffset 170}Uptime: ${uptime_short}
# CPU usage #
${color 0ABFFF}${hr 1}$color
${color 0ABFFF}${voffset 6}Temp: $color ${execi 5 sensors|grep 'Core 0'|cut -c18-24}
${color 0ABFFF}${voffset 6}Processes:$color $processes
${color 0ABFFF}${voffset 6}Running: $color  $running_processes${goto 116}${voffset 8}${cpu cpu0}% ${color 0ABFFF}${goto 116}${voffset 13}CPU1$color${goto 191}${voffset -12}${cpu cpu1}% ${color 0ABFFF}${goto 191}${voffset 12}CPU2$color
${color 0ABFFF}${voffset -12}FREQ:$color ${freq}MHz
${color 0ABFFF}${voffset 6}Load:$color ${loadavg}
# Network #
${color 0ABFFF}${voffset 2}${hr 1}
${color 0ABFFF}${voffset 5}Hostname: $color$alignr$nodename
#${color 0ABFFF}wlan0: $color$alignr${addr wlan0}
#${color 0ABFFF}Current: $color${alignr}${execi 10 /sbin/iwconfig wlan0|grep Rate|cut -d"M" -f1|cut -b20-24} Mbits/sec
${color 0ABFFF}eno1: $color$alignr${addr eno1}
${if_existing /proc/net/route tun0}${color 0ABFFF}tun0: $color$alignr${addr tun0}${endif}

${color 0ABFFF}Down: $color${downspeed eno1}/s ${alignr}${color #0ABFFF}Up:$color ${upspeed eno1}/s
${downspeedgraph eno1 30,120 000000 FF0000} ${alignr}${upspeedgraph eno1 30,120 000000 04E200}$color
${color 0ABFFF}Total:$color ${totaldown eno1} ${alignr}${color 0ABFFF}Total:$color ${totalup eno1}
# DISK/RAM/SWAP usage #
${color 0ABFFF}${voffset 2}${hr 1}
${color FFFFFF}${goto 7}${voffset 39}${fs_used_perc /}%
${color 0ABFFF}${goto 7}DISK
${color FFFFFF}${goto 102}${voffset -27}${memperc}%
${color 0ABFFF}${goto 102}RAM
${color FFFFFF}${goto 192}${voffset -26}${swapperc}%
${color 0ABFFF}${goto 191}SWAP
# Running processes #
${color 0ABFFF}${voffset 2} ${hr 1}
${color 0ABFFF}${voffset 5}NAME${goto 163}CPU%${goto 210}MEM%$color${voffset 5}
${top name 1}${goto 160}${top cpu 1}${goto 205}${top mem 1}
${top name 2}${goto 160}${top cpu 2}${goto 205}${top mem 2}
${top name 3}${goto 160}${top cpu 3}${goto 205}${top mem 3}
${top name 4}${goto 160}${top cpu 4}${goto 205}${top mem 4}
${top name 5}${goto 160}${top cpu 5}${goto 205}${top mem 5}
# Computer info #
${color 0ABFFF}${voffset 2}${hr 1}${voffset 5}
${color 0ABFFF}OS:$color${alignr}${exec cat /etc/issue.net} $machine
${color 0ABFFF}Kernel:$color${alignr}${kernel}$color
# Logging #
${color 0ABFFF}${voffset 2}${hr 1}$color
${color 0ABFFF}${alignc}SYSLOG:$color
${color 0ABFFF}${voffset -5}${hr 1}$color
${voffset 5}${font caviar dreams:size=9}${execi 10 tail -n4 /var/log/syslog | awk '{print " ",$0}' | fold -s45}
Notes:
  • This gives a more accurate reading of the cpu temp considering "acpitemp" could really be anything, including the temp on your physical motherboard, lol.
  • The 2nd gradient colors of the download/upload graphs fit my liking and habit of seeing those colors in DU Meter in windoze. You could argue that it breaks the "entirely blue" color scheme but I find these graphs are more noticeable (especially when rogue apps start uploading secret mothership data.)
  • The name, "wlan0" needs to be modified if you're going to be using unreliable wifi on the desktop. Easiest way to find out the name is by doing an ifconfig and seeing the correct adapter name in the left column.
  • own_window_hints undecorated is probably what you wanted for a borderless window without a title bar. You can move the window (by default) by holding ALT+left click.
  • The reason why I have gap_y 38 is because on my 2nd monitor (where I like the Conky window to show up), the window will align to the top area of the screen, regardless if it's viewable or not. Here's why, the following second monitor position is intentional:
    monitor-prefs.png
    ...long story short, watch this insightful youtube clip, use the "Esco" window border, and the extra y setting compensates.
  • I have absolutely no idea where the reference to ~/.conky/accu_weather/rss/weather is, so (much like unreliable yahoo weather sources) I left it out completely, along with the battery portion.
  • In the last bit showing the last 4 lines of the syslog, 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. The original code cut off the lines since obviously there's more than just $10 elements...maybe @xenopeek has some insight on this. I simply show the entire line and make the font a bit smaller and wrap line words. Preferably I'd want: tail -n5 /var/log/syslog | awk '{ print $3,$5,...,[EOL]) }' since obviously log event times are important.
  • Feel free to add your own notes because I'm obviously stupid.
LPT: If you want easy readability when making changes in XED, change the highlight mode in XED by doing View -> Highlight Mode -> Source -> Boo. I don't know why "Boo" works so well with conky configs, but it's so bae.
Did you know? These are actually legacy Conky configs now. The updated 1.10+ Conky follows the Lua syntax. Thankfully 1.10 reads legacy code fine. For now.

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

Re: Conky Showoff thread

Post by Sector11 » Wed Aug 17, 2016 10:02 am

Hi ostracized

In the LUA script you are using:

Code: Select all

    {
        name='cpu',
        arg='cpu0',
        blah blah ...
    },
    {
        name='cpu',
        arg='cpu1',
        blah blah ...
    },
which means you are showing the "average" of your two CPU's and CPU 1 - or if you're running an Intel chip CORES

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 ...
    },
Take a look at this post for an explanation of how:
  • Intel uses CORE 0 and CORE 1 for a dual core chip
  • AMD uses CPU 1 and CPU 2 for a dual core chip
  • conky uses ${cpu cpu1} and ${cpu cpu2} for separate cores/cpus
  • and also ${cpu} or ${cpu cpu0} for the the average of the cores/cpus
From: http://conky.sourceforge.net/variables.html
cpu (cpuN)
CPU usage in percents. For SMP machines, the CPU number can be provided as an argument. ${cpu cpu0} is the total usage, and ${cpu cpuX} (X >= 1) are individual CPUs.
[*] I have absolutely no idea where the reference to ~/.conky/accu_weather/rss/weather is, so (much like unreliable yahoo weather sources) I left it out completely, along with the battery portion.
That can be found here: » Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant) - bash scripts that are well documented and supported by TeoBigusGeekus.

Scroll down to: 1d)Accuweather RSS - 1d_12-2-14 :)

Does ${pre_exec} work in conky v1.10 yet?
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

Post by 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

Post Reply

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