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
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 »

That looks better than the strange color flow of the gradient..
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: Fri Aug 12, 2022 12:15 pm

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",
Oh I somehow missed this comment and just noticed it now. I read it and was hoping the x,y parameters might be the solution to my problem, unfortunately all they do is move the entire bar from side to side and up and down. I was thinking it would change where the colours start. Here I add green and it seems the colours start almost in the middle instead of the beginning of the bar
Attachments
Screenshot from 2022-08-15 13-01-37.png
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: Sat Aug 13, 2022 2:39 am That looks better than the strange color flow of the gradient..
Yeah true

Do you know why the red and green would stop and start at different points on the bars? For "core clock", the green almost starts at the beginning, I just need to figure out how to move it back a bit mroe
Attachments
Screenshot from 2022-08-15 13-21-43.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 »

My guess is.. for some reason the red exceeds the end of the bar and goes on at the beginning of the bar over the green.
Does this make sense to you? Why it does that i have no clue. And i can't reproduce that behavior on my system, so i can't play with values and options to see if i can fix it.
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 »

TinMan1325 wrote: Fri Aug 12, 2022 6:09 pm On the gpubars.lua I noticed changing "max=100," to different numbers makes changes to the colours as well
It has to do with that type of stuff. You changed odd parameters trying to tweak the color but that's not the correct thing.

Read the comments in the file.

I thought there was another post earlier where you had mentioned changing width for example and it changed the colors, but that only messes up the scheme.

You should fall back to predictable numbers. I don't know what they are at this point I couldn't be sure where to look to find any current script, but if you have a bar that's 200 pixels, then you need to make it act right and correctly start and stop where those 200 pixels are, and the gradient colors need to be specified clearly, and you should use 100 on the example of when an output is going to show you from 0% to 100%, which is what a cpu output would do. :wink:

So tweak the numbers back to predictable conditions.
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 »

The max= value is a little strange, but under normal conditions, it should be at 100!

When you set it to 10, then if the cpu is at 10% it will max out the bar. If you set it to 50, then it will max out the bar when cpu is at 50%. If you set it at 200 and cpu is at 100% then the bar is only half filled! (as i said, strange value)
You can try and play with it! Maybe it helps? But i don't think so..

This is useful if you have something like a temperature that can exceed the value of 100.. like 110 degree celcius. Then you have to set the max value at 110. Or if you use the bar for fan speed in rpm value, and the fans max rpm is 2000, then you set it at 2000.
Last edited by Koentje on Mon Aug 15, 2022 9:31 pm, edited 2 times in total.
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 »

zcot wrote: Mon Aug 15, 2022 6:55 pm So tweak the numbers back to predictable conditions.
The problem is that i gave him a perfectly working conky on my system and when started on his system the color gradient is completely messed up! If you read back some pages you see that it was with the first conky i made for him, and now it is the exact same problem with these 2 conky's i made. They work perfectly on my system, but not on his. I wonder if it has something to do with the graphics card or a driver? He has a NVIDIA and i have AMD.. would be nice if someone with an NVIDIA could test if that's the case!
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, i have tried to reproduce the gradient problem or change all kind of values but i can't find a solution for the gradient problem. So it is something on your system that causes this.

The only thing what i can think of is removing the 3 reflection lines at the end of each CPU block..
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 »

Koentje wrote: Mon Aug 15, 2022 9:02 pm
zcot wrote: Mon Aug 15, 2022 6:55 pm So tweak the numbers back to predictable conditions.
The problem is that i gave him a perfectly working conky on my system and when started on his system the color gradient is completely messed up! If you read back some pages you see that it was with the first conky i made for him, and now it is the exact same problem with these 2 conky's i made. They work perfectly on my system, but not on his. I wonder if it has something to do with the graphics card or a driver? He has a NVIDIA and i have AMD.. would be nice if someone with an NVIDIA could test if that's the case!
I went digging back 3 pages and downloaded a number of archives, none of them were complete though, only a single file, so I'm missing the rest of the pieces, and obviously if I go ahead and start on page 1 and reread every post I will end up seeing the full package. I did install the initial offering from TinMan1325 back at the start of the thread, and I was able to to make it work without problems, but then it goes into, we are now 8 pages in. :wink:

I do have amd and nvidia systems.

Koentje, with your scripting ability, I think it would be great to have a "configure all the shit bro" script. And it would just run some automated checks and populate the right variables for the related scripts, 2 core, 4 core, 6 core, active network interface, etc.. I'm weak on bash, and since I do not have any problem digging directly right through a conky config or lua and tweaking the necessary parts, I have never messed around with that. But I've thought about it numerous times! :D -honestly conky should have that inbuilt so we can make the configs a bit more generic for everybody!

Maybe the conky-manager2 should have that feature?! NO WAY! THANK YOU SIR! lol!! :lol

But I have done a few basic lua offerings for ./lib or ./standards offerings for some simple basic things where we can simply call generically for a network graph or similar basic features without having to specify the device or interface.

But not useful here.

Where can I find the definitive package to test? Or at least what page? :D I'll test for it!
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 »

zcot wrote: Mon Aug 15, 2022 10:50 pm Koentje, with your scripting ability, I think it would be great to have a "configure all the shit bro" script. And it would just run some automated checks and populate the right variables for the related scripts, 2 core, 4 core, 6 core, active network interface, etc..
That should have been an option in conky-manager already! ;)
But what kind of script did you have in mind? One that finds how many cores and then writes a conky script for it?

I'm weak on bash, and since I do not have any problem digging directly right through a conky config or lua and tweaking the necessary parts, I have never messed around with that. But I've thought about it numerous times! :D -honestly conky should have that inbuilt so we can make the configs a bit more generic for everybody!
My weaker part is Lua. Still learning, but am not doing enough with it. I can dream conky scripting and i like it very much in combination with bash scripting!

Maybe the conky-manager2 should have that feature?! NO WAY! THANK YOU SIR! lol!! :lol
Why not? I think it would be nice for new users to have a menu option where you can choose out of different scripts. Say you have a 4 core system, then it only shows an option to make a script for a 4 core (or 8 with ht). Or if you want a network script then it already knows the network name etc..
For example this gives you the network name:
ip a | grep $(hostname -I | awk '{print $1}') | awk '{print $NF}'
This will give you the cpu cores:
awk '/^processor/{n+=1}END{print n}' /proc/cpuinfo

Where can I find the definitive package to test? Or at least what page? :D I'll test for it!
raminfo.tar.gz
(47.63 KiB) Downloaded 59 times
cpuinfo.tar.gz
(46.25 KiB) Downloaded 52 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 »

Koentje wrote: Mon Aug 15, 2022 6:41 pm My guess is.. for some reason the red exceeds the end of the bar and goes on at the beginning of the bar over the green.
Does this make sense to you? Why it does that i have no clue. And i can't reproduce that behavior on my system, so i can't play with values and options to see if i can fix it.
Sorry for taking so long to respond. But yes, that is what it looks like to me as well. I'll try and mess around with it some more again when I have some free time (hopefully within the next week), though I'm not really sure which numbers I can change at this point
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 »

You can try to set the max= value to 50 (or 150) and see if the red still exceeds the end of the bar..

But also important is to read the comments in the beginning of the lua file. That explains all the options you have!
And to be honest, i can't help you with this minor problem because i can't replicate it on my machine. The only way i could help you with this is if i can remote to your desktop and try different options and see what's happening.
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 18, 2022 9:09 pm You can try to set the max= value to 50 (or 150) and see if the red still exceeds the end of the bar..

But also important is to read the comments in the beginning of the lua file. That explains all the options you have!
And to be honest, i can't help you with this minor problem because i can't replicate it on my machine. The only way i could help you with this is if i can remote to your desktop and try different options and see what's happening.
The higher the number, the lower the bar went
https://imgur.com/a/AnZcTbx

Oh well. I'm going on vacation for a couple of weeks, I'll have another go at it then I suppose

Thanks for everything
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 »

As i said before, have you tried and remove the reflection lines at the end of each block?

Code: Select all

  reflection="r",
  reflection_alpha=0,
  reflection_length=0,
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: Mon Aug 15, 2022 10:50 pm Where can I find the definitive package to test? Or at least what page? :D I'll test for it!
This is everything I have. I still can't get it to look right, unfortunately

https://drive.google.com/file/d/1ZWO6Le ... sp=sharing
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: Mon Aug 22, 2022 12:30 am As i said before, have you tried and remove the reflection lines at the end of each block?

Code: Select all

  reflection="r",
  reflection_alpha=0,
  reflection_length=0,
Yeah that didn't seem to change anything at all
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: Mon Aug 29, 2022 4:44 pm Yeah that didn't seem to change anything at all
I din't think it would make any difference either because it was turned off (=0), but you never know.. i have nothing else to try.
I would like to know if the same happens on one of zcot's nvidia systems..
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: Mon Aug 29, 2022 5:03 pm I din't think it would make any difference either because it was turned off (=0), but you never know.. i have nothing else to try.
I would like to know if the same happens on one of zcot's nvidia systems..
It's all good. Thank for all the help you gave, it's really appreciated

I'm pretty sure there's just something weird happening on my end, somehow

The colours used to work just fine for Network Device on 20.3 and now they don't work properly on 21
They fade lighter instead of darker now
Attachments
Screenshot from 2022-08-29 17-11-57.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 »

TinMan1325 wrote: Mon Aug 29, 2022 5:17 pm It's all good. Thank for all the help you gave, it's really appreciated
You're welcome!
The colours used to work just fine for Network Device on 20.3 and now they don't work properly on 21
They fade lighter instead of darker now
That is indeed strange, because you have set the first color to black.. so it should gradiently go to black...

Did you set any monitor color profile by any chance? Or set the color to BGRA or something like that?
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: Mon Aug 29, 2022 6:01 pm That is indeed strange, because you have set the first color to black.. so it should gradiently go to black...

Did you set any monitor color profile by any chance? Or set the color to BGRA or something like that?
I'm not sure, I don't think so
Locked

Return to “Compiz, Conky, Docks & Widgets”