How to get Specific Conky scripts to work?

Add functionality to your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
zcot
Level 9
Level 9
Posts: 2838
Joined: Wed Oct 19, 2016 6:08 pm

Re: How to get Specific Conky scripts to work?

Post by zcot »

Well, unfortunately I think you will not be able to run more than one instance in the terminal test mode. :( If you want to test that one script, then uncheck it, make sure it is selected, then use the terminal icon.

you show this, from the regular terminal, manual run:

Code: Select all

conky: llua_load: cannot open allcombined.lua: No such file or directory
look at the first line though:

Code: Select all

$ conky -c '/home/tinman1325/.conky/AutomatiK/cpuinfo.conky'
same exact line, easier:

Code: Select all

$ conky -c '~/.conky/AutomatiK/cpuinfo.conky'
but that doesn't matter,

but, and you didn't show it, before the command it should look like this instead:

Code: Select all

~/.conky/AutomatiK/$ conky -c '/home/tinman1325/.conky/AutomatiK/cpuinfo.conky'
did you cd to that directory first?
easier line:

Code: Select all

~/.conky/AutomatiK/$ conky -c '~/.conky/AutomatiK/cpuinfo.conky'
even easier:

Code: Select all

~/.conky/AutomatiK/$ conky -c cpuinfo.conky
So, look at that and check the output.


But look at this, just so you understand it.
Open terminal, type: echo $PWD
now type: cd .conky/AutomatiK/
again: echo $PWD
So, you should understand that. When conky is initiated, with any script, and you can do it 100 times or something, it will still check that PWD for the current script and use it as a reference for the file system. Each script you start will have its own context. So any other internal commands within that config that use paths will be related to what conky knows as the PWD or Current Working Directory. This is the base point for that config. It's important, -otherwise the entire thing, every single reference, to anything path related, will be required to be fully absolute paths, and that just sucks for everybody. :wink: ps. "$PWD" as an environment variable is not actually used, but it's the same results, I'm only using that feature to show how the thing works as an example. Actually many programs will do this same thing, they want to understand what context they are being run from.
User avatar
Koentje
Level 7
Level 7
Posts: 1578
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: How to get Specific Conky scripts to work?

Post by Koentje »

Can you post the outcome of sensors. I need to check if the temp that is showed is the correct one. The rest is already working.
Schermafdruk van 2022-08-10 10-03-12.jpg
Schermafdruk van 2022-08-10 10-03-12.jpg (17.63 KiB) Viewed 1194 times
User avatar
Koentje
Level 7
Level 7
Posts: 1578
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: How to get Specific Conky scripts to work?

Post by Koentje »

Try this one and see if it works.
cpuinfo.tar.gz
(46.09 KiB) Downloaded 60 times
User avatar
Koentje
Level 7
Level 7
Posts: 1578
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: How to get Specific Conky scripts to work?

Post by Koentje »

And here is your ram info!
raminfo.tar.gz
(47.63 KiB) Downloaded 58 times
TinMan1325
Level 3
Level 3
Posts: 114
Joined: Mon Apr 18, 2022 4:08 pm

Re: How to get Specific Conky scripts to work?

Post by TinMan1325 »

zcot wrote: Tue Aug 09, 2022 9:40 pm Snip
Ah ha ok, thank you for the tips
TinMan1325
Level 3
Level 3
Posts: 114
Joined: Mon Apr 18, 2022 4:08 pm

Re: How to get Specific Conky scripts to work?

Post by TinMan1325 »

Koentje wrote: Wed Aug 10, 2022 4:03 am Can you post the outcome of sensors. I need to check if the temp that is showed is the correct one. The rest is already working.

Schermafdruk van 2022-08-10 10-03-12.jpg

Code: Select all

$ sensors
nvme-pci-0100
Adapter: PCI adapter
Composite:    +39.9°C  (low  = -273.1°C, high = +84.8°C)
                       (crit = +84.8°C)
Sensor 1:     +39.9°C  (low  = -273.1°C, high = +65261.8°C)
Sensor 2:     +43.9°C  (low  = -273.1°C, high = +65261.8°C)

iwlwifi_1-virtual-0
Adapter: Virtual device
temp1:        +38.0°C  

k10temp-pci-00c3
Adapter: PCI adapter
Tctl:         +34.9°C  
Tccd1:        +28.8°C  
TinMan1325
Level 3
Level 3
Posts: 114
Joined: Mon Apr 18, 2022 4:08 pm

Re: How to get Specific Conky scripts to work?

Post by TinMan1325 »

Koentje wrote: Wed Aug 10, 2022 11:07 am Try this one and see if it works.

cpuinfo.tar.gz
The temp wasn't working so I just used the line from the old one and it works now

Code: Select all

Temperature:  ${texeci 10 sensors | grep temp | awk '!/-/' | awk '{ print $2}' | sort -r | head -n 1}
Looks great. I'm just trying to change a couple of things. I figured out how to make the graphs slightly longer but it didn't fill them in

And when I hit the Hot Corner to minimize everything, the CPU and Memory ones both get minimized as well. I think that was happening before. I just need to remember how to fix that
Edit: hmm it says "-- own_window_type desktop" so I don't see why it's getting minimized
Attachments
new.png
User avatar
Koentje
Level 7
Level 7
Posts: 1578
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: How to get Specific Conky scripts to work?

Post by Koentje »

Ok, a few things..

1. If you use my script for the temp readout, that is much quicker! If you look into the cputemp.sh you can enter a module name. I have set it to coretemp thats mostly for intel based cpu's. But if your system is getting the temp readout from k10temp you can set that as module name. My script also changes the color of the temp if it gets too hot.. blue is normal, purple-ish (65) is warm and red (75) is hot.

2. The minimize thing is probably because of a wrong setting in the conky script. On the 8th line you see own_window_type that is commented out (the 2 dashes in front). Remove these and now the window should stay put on the root window (background). The line should be: own_window_type = desktop, (don't forget the comma at the end!)

3. How did you make these bars longer?? The only correct way to make them longer is bij going into cpubars.lua and change from each CPU block the line blocks=41 to a number that fits your need.

EDIT: It can also be own_window_type = 'desktop', !
TinMan1325
Level 3
Level 3
Posts: 114
Joined: Mon Apr 18, 2022 4:08 pm

Re: How to get Specific Conky scripts to work?

Post by TinMan1325 »

Koentje wrote: Wed Aug 10, 2022 10:22 pm Ok, a few things..

1. If you use my script for the temp readout, that is much quicker! If you look into the cputemp.sh you can enter a module name. I have set it to coretemp thats mostly for intel based cpu's. But if your system is getting the temp readout from k10temp you can set that as module name. My script also changes the color of the temp if it gets too hot.. blue is normal, purple-ish (65) is warm and red (75) is hot.

2. The minimize thing is probably because of a wrong setting in the conky script. On the 8th line you see own_window_type that is commented out (the 2 dashes in front). Remove these and now the window should stay put on the root window (background). The line should be: own_window_type = desktop, (don't forget the comma at the end!)

3. How did you make these bars longer?? The only correct way to make them longer is bij going into cpubars.lua and change from each CPU block the line blocks=41 to a number that fits your need.

EDIT: It can also be own_window_type = 'desktop', !
Oh nice, yes that fixed the temp readout and is showing the new colour


I made the bars longer by changing 121 to 151 in this line

Code: Select all

CPU 1${goto 50} : ${cpu cpu1}% ${goto 230}${color}${freq 1} MHz${image ./img/trans-bg240.png -p 96,105 -s 121x11}
Edit: own_window_type = 'desktop', did the trick :D
Attachments
Screenshot from 2022-08-11 13-02-49.png
User avatar
Koentje
Level 7
Level 7
Posts: 1578
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: How to get Specific Conky scripts to work?

Post by Koentje »

ok, so everything works? :)

There is still one thing that seems to be incorrect and that's the colors of the cpubars. You had the same problem with the first script i made for you. I can't remember what we did to fix that.... was it commenting out the alarm color in cpubars.lua??
If you do you will only have green bars..
TinMan1325
Level 3
Level 3
Posts: 114
Joined: Mon Apr 18, 2022 4:08 pm

Re: How to get Specific Conky scripts to work?

Post by TinMan1325 »

Koentje wrote: Thu Aug 11, 2022 7:48 pm ok, so everything works? :)

There is still one thing that seems to be incorrect and that's the colors of the cpubars. You had the same problem with the first script i made for you. I can't remember what we did to fix that.... was it commenting out the alarm color in cpubars.lua??
If you do you will only have green bars..
Yeah I think we did comment out something. I'll try messing around with it some more to see if I can get the colours right
I'm also trying to figure out how to use the trans-bg240.png with the GPU bars

Did you do a clean install of 21 and everything still worked? I'm trying to figure out why it didn't work for me. I did uninstall a few things like FireFox before I installed Conky, but that's about it

Then I just have to figure out how to make network graphs fade out like in the first image
Attachments
graph2.png
graph2.png (1.51 KiB) Viewed 1032 times
graph.png
graph.png (1.05 KiB) Viewed 1032 times
User avatar
Koentje
Level 7
Level 7
Posts: 1578
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: How to get Specific Conky scripts to work?

Post by Koentje »

TinMan1325 wrote: Thu Aug 11, 2022 10:33 pm Yeah I think we did comment out something. I'll try messing around with it some more to see if I can get the colours right
I would compare the gpu and cpu lua files and see if there are some difference. My guess is that alarm_colour= is commented out. (2 dashes in front)

I'm also trying to figure out how to use the trans-bg240.png with the GPU bars
They are useless if you ask me. They show an empty bar untill the lua script is loaded. That's a tenth of a second or so..
I left them in, but you could also delete these because it is all extra what is loaded.
Behind every Mhz you can delete the ${image ./img/trans-bg240.png -p 96,180 -s 121x11} part!

Did you do a clean install of 21 and everything still worked? I'm trying to figure out why it didn't work for me. I did uninstall a few things like FireFox before I installed Conky, but that's about it
No i'm still on 20.3. But i've seen more complaints about 21 giving problems with conky. And most of the reasons were that it doesn't work with the old script layout anymore! Before conky was backwards compatible, it seems now it's not anymore.
That's why my script kept on working (new layout) and the others not. And ofcourse i used my lua script instead of the one that came with your conky's.

Then I just have to figure out how to make network graphs fade out like in the first image
The last time we made both colors the same. So you have to make the first color black again. (6x0)
Like this: ${downspeedgraph eno2 50,140 000000 00FF00}
TinMan1325
Level 3
Level 3
Posts: 114
Joined: Mon Apr 18, 2022 4:08 pm

Re: How to get Specific Conky scripts to work?

Post by TinMan1325 »

Koentje wrote: Fri Aug 12, 2022 8:33 am No i'm still on 20.3. But i've seen more complaints about 21 giving problems with conky. And most of the reasons were that it doesn't work with the old script layout anymore! Before conky was backwards compatible, it seems now it's not anymore.
That's why my script kept on working (new layout) and the others not. And ofcourse i used my lua script instead of the one that came with your conky's.
Ohh ok. I had to upgrade because in 20.3 my keyboard was constantly causing my computer to go into suspend. I switched to Manjaro and the keyboard issue was fixed but the conky's were doing the same thing they are now

Then 21 came out and I decided to check it out and the keyboard problem is now solved on Mint, but the conky's are messed up

Oh well, I'm going to continue playing around with the colour and see if I can get it to work properly. I don't think I'll be successful though, it just isn't making any sense to me. (It's weird that the CPU temp colours that you made work for me though)

For example, I'm trying to change the colour for the fan speed, so I set everything to 0 except the first two digits, in my mind that should change the colour at the start of the graph, but for some reason the middle is where it begins
Attachments
fan.png
User avatar
zcot
Level 9
Level 9
Posts: 2838
Joined: Wed Oct 19, 2016 6:08 pm

Re: How to get Specific Conky scripts to work?

Post by zcot »

Code: Select all

Parameters are :
3 parameters are mandatory
name		- the name of the conky variable to display, for example for {$cpu cpu0}, just write name="cpu"
arg		- the argument of the above variable, for example for {$cpu cpu0}, just write arg="cpu0"
		  arg can be a numerical value if name=""
max		- the maximum value the above variable can reach, for example, for {$cpu cpu0}, just write max=100
	
Optional parameters:
x,y		- coordinates of the starting point of the bar, default = middle of the conky window
cap		- end of cap line, ossibles values are r,b,s (for round, butt, square), default="b"
		  http://www.cairographics.org/samples/set_line_cap/
angle		- angle of rotation of the bar in degress, default = 0 (i.e. a vertical bar)
		  set to 90 for an horizontal bar
skew_x		- skew bar around x axis, default = 0
skew_y		- skew bar around y axis, default = 0
blocks  	- number of blocks to display for a bar (values >0) , default= 10
height		- height of a block, default=10 pixels
width		- width of a block, default=20 pixels
space		- space between 2 blocks, default=2 pixels
angle_bar	- this angle is used to draw a bar on a circular way (ok, this is no more a bar !) default=0
radius		- for cicular bars, internal radius, default=0
			  with radius, parameter width has no more effect.

Colours below are defined into braces {colour in hexadecimal, alpha}
fg_colour	- colour of a block ON, default= {0x00FF00,1}
bg_colour	- colour of a block OFF, default = {0x00FF00,0.5}
alarm		- threshold, values after this threshold will use alarm_colour colour , default=max
alarm_colour 	- colour of a block greater than alarm, default=fg_colour
smooth		- (true or false), create a gradient from fg_colour to bg_colour, default=false 
mid_colour	- colours to add to gradient, with this syntax {position into the gradient (0 to1), colour hexa, alpha}
			  for example, this table {{0.25,0xff0000,1},{0.5,0x00ff00,1},{0.75,0x0000ff,1}} will add
			  3 colurs to gradient created by fg_colour and alarm_colour, default=no mid_colour
led_effect	- add LED effects to each block, default=no led_effect
			  if smooth=true, led_effect is not used
			  possibles values : "r","a","e" for radial, parallelel, perdendicular to the bar (just try!)
			  led_effect has to be used with theses colours :
fg_led		- middle colour of a block ON, default = fg_colour
bg_led		- middle colour of a block OFF, default = bg_colour
alarm_led	- middle colour of a block > ALARM,  default = alarm_colour

reflection parameters, not avaimable for circular bars
reflection_alpha    - add a reflection effect (values from 0 to 1) default = 0 = no reflection
                      other values = starting opacity
reflection_scale    - scale of the reflection (default = 1 = height of text)
reflection_length   - length of reflection, define where the opacity will be set to zero
					  calues from 0 to 1, default =1
reflection	- position of reflection, relative to a vertical bar, default="b"
					  possibles values are : "b","t","l","r" for bottom, top, left, right
draw_me     - if set to false, text is not drawn (default = true or 1)
              it can be used with a conky string, if the string returns 1, the text is drawn :
              example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",
User avatar
Koentje
Level 7
Level 7
Posts: 1578
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: How to get Specific Conky scripts to work?

Post by Koentje »

TinMan1325 wrote: Fri Aug 12, 2022 11:55 am Oh well, I'm going to continue playing around with the colour and see if I can get it to work properly. I don't think I'll be successful though, it just isn't making any sense to me. (It's weird that the CPU temp colours that you made work for me though)
What is weird about it? These color changes are made in the bash script cpuinfo.sh. If you want to change the colors of this i changed the script a little so you can changes them easier and you can now also turn colors ON/OFF. Don't forget to change to your modulename!
cputemp.sh.tar.gz
(872 Bytes) Downloaded 47 times

For example, I'm trying to change the colour for the fan speed, so I set everything to 0 except the first two digits, in my mind that should change the colour at the start of the graph, but for some reason the middle is where it begins.
Two things:

1. That faulty gradient color change is something on your system i don't understand why it does that!? On al my systems it works like a charm, but on your system it for some reason does not shows correctly!

2. You are thinking wrong in changing the colors. Changing the first two digits does not mean that it changes the first part of the bar. The first two digits is how many RED you add to the color. It is RRGGBB, so 2 digits for red, 2 digits for green and 2 digits for blue. So AA0000 means only red, because zero green and zero blue is added! The numbering of the 2 digits goes from 00 to 99 and then it's not 100 but A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, AA, AB, AC, AD, AE, AF, B0, B1 etc untill FF.
So 00FF88 means zero red, full green and about half blue.

In the lua script:
fg_colour means ForeGround color (the color when the leds are on)
bg_colour means BackGround color (the color when the leds are off)
alarm_colour means the color were the foreground color changes into at the end
{0x22ff22,1} the first 0x i have no idea what that stands for, i tried different values but i can't see any difference. So best leave it to 0. The next part are the 6 digits for the color RRGGBB. and the last part ,1 is transparancy of the color. Goes from 0.1 to 1.

I hope that clears some things up? If not, let me know.. ;)
TinMan1325
Level 3
Level 3
Posts: 114
Joined: Mon Apr 18, 2022 4:08 pm

Re: How to get Specific Conky scripts to work?

Post by TinMan1325 »

Koentje wrote: Fri Aug 12, 2022 12:36 pm 1. That faulty gradient color change is something on your system i don't understand why it does that!? On al my systems it works like a charm, but on your system it for some reason does not shows correctly!
Yeah it's weird, I don't get it. The transparency is working for them now though, so that's something

On the gpubars.lua I noticed changing "max=100," to different numbers makes changes to the colours as well

Yes the definitely helps clear things up. I'm going to keep playing around with it for a little more before I call it quits completely
User avatar
Koentje
Level 7
Level 7
Posts: 1578
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: How to get Specific Conky scripts to work?

Post by Koentje »

Watch it though.. it is very addictive! I am always tuning and tweaking my scripts. I even have a separate display just for al my conky's! (about 62 conky scripts, 71 bash scripts and 18 lua scripts) :mrgreen:
TinMan1325
Level 3
Level 3
Posts: 114
Joined: Mon Apr 18, 2022 4:08 pm

Re: How to get Specific Conky scripts to work?

Post by TinMan1325 »

Koentje wrote: Fri Aug 12, 2022 7:24 pm Watch it though.. it is very addictive! I am always tuning and tweaking my scripts. I even have a separate display just for al my conky's! (about 62 conky scripts, 71 bash scripts and 18 lua scripts) :mrgreen:
Haha yes I'm starting to realize that. My wife is getting really annoyed with me just staring at this for so long. I need a break. But I'm starting to make some progress... I think. Fan speed on the GPU is so close


And my goodness, that's a whole lot of conky's :D :D
Attachments
fan.png
User avatar
Koentje
Level 7
Level 7
Posts: 1578
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: How to get Specific Conky scripts to work?

Post by Koentje »

Have you tried smooth=true set to false?

Yes and the list keeps growing.. i was already thinking of buying a bigger monitor for my dashboard! I'm out of room :lol:
http://www.cobrasoft.nl/pics/conky_mess1.jpg

That's why some of them are already on my normal display and i don't want that..
http://www.cobrasoft.nl/pics/conky_mess2.jpg
TinMan1325
Level 3
Level 3
Posts: 114
Joined: Mon Apr 18, 2022 4:08 pm

Re: How to get Specific Conky scripts to work?

Post by TinMan1325 »

Koentje wrote: Fri Aug 12, 2022 9:47 pm Have you tried smooth=true set to false?

Yes and the list keeps growing.. i was already thinking of buying a bigger monitor for my dashboard! I'm out of room :lol:
http://www.cobrasoft.nl/pics/conky_mess1.jpg

That's why some of them are already on my normal display and i don't want that..
http://www.cobrasoft.nl/pics/conky_mess2.jpg
It just turned it a solid green

Haha there's a whole lot going on there, nice
Attachments
fan2.png
Locked

Return to “Compiz, Conky, Docks & Widgets”