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

I use ConkyManager2 that perfectly autostart the scripts at logon. And also with a delay if you need it to.
https://github.com/zcot/conky-manager2

Or do i miss your point here?
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 Jun 24, 2022 1:53 pm snip
Hey there, sorry to bother you again, but I was wondering if you'd be able to help me out once more? The new update to 21 seems to have messed things up for me. It was a clean install

If you are able to help me, these are the issues I'm having

The bars for the CPU and Memory don't work anymore, neither shows any colour.
And the colours on the Network Device are wrong. Uploads should be a solid red and downloads should be a solid green, but for some reason they are going from green to yellow to red, which is weird because those are the colours we were trying to get to show on the other graphs but weren't able to
Attachments
Screenshot from 2022-08-07 16-54-44.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 »

Ha, and my conky is still going strong! ;)

But ok, one problem at a time.. the network colors is because of a gradient setting! You can change these for yourself in the script. On this site you have almost all objects you can use in the script: http://conky.sourceforge.net/variables.html

If you look at the upspeedgraph (same settings as downspeedgraph) you see the option gradient_colour 1 and gradient colour 2. If you make these values the same color then there should be no more gradient. Or you can still use different colors but use the -t option. Now the gradient is vertical!
Schermafdruk van 2022-08-07 23-07-19.jpg
Btw the colors are hex.. RRGGBB (from 00 to FF)
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: Sun Aug 07, 2022 5:12 pm Ha, and my conky is still going strong! ;)

But ok, one problem at a time.. the network colors is because of a gradient setting! You can change these for yourself in the script. On this site you have almost all objects you can use in the script: http://conky.sourceforge.net/variables.html

If you look at the upspeedgraph (same settings as downspeedgraph) you see the option gradient_colour 1 and gradient colour 2. If you make these values the same color then there should be no more gradient. Or you can still use different colors but use the -t option. Now the gradient is vertical!
Schermafdruk van 2022-08-07 23-07-19.jpg

Btw the colors are hex.. RRGGBB (from 00 to FF)
Yes that definitely did it. Sorry, I should have remembered how to do that. I don't know why it happened though, it wasn't doing that before
Attachments
Screenshot from 2022-08-07 18-48-10.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, check! One problem solved..

What exactly is wrong with the cpu and ram?
I have it running! (except for the temperature)
Schermafdruk van 2022-08-08 01-30-06.jpg
Schermafdruk van 2022-08-08 01-30-06.jpg (27.85 KiB) Viewed 1170 times
Can you attach your cpu script for me to check? I think i know what the problem is.
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: Sun Aug 07, 2022 7:00 pm Ok, check! One problem solved..

What exactly is wrong with the cpu and ram?
I have it running! (except for the temperature)

Schermafdruk van 2022-08-08 01-30-06.jpg

Can you attach your cpu script for me to check? I think i know what the problem is.
I have no idea what is wrong with it. This stuff is really confusing for me

Here's the CPU script (oh it won't let me upload the file for some reason)

Code: Select all

double_buffer yes
update_interval 2
background yes

own_window yes

own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_type override
own_window_argb_visual no
own_window_argb_value 160
out_to_console no
own_window_transparent no
own_window_class conky-semi
use_xft yes
xftfont cure:size=10

#use_xft yes
#xftfont Sansation:size=9
xftfont Rounded Elegance:size=10
xftalpha 0
update_interval 2
cpu_avg_samples 2
net_avg_samples 2
double_buffer yes
maximum_width 320
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
stippled_borders 1
border_width 0
default_color white
default_shade_color white
default_outline_color white
alignment middle_right

use_spacer left
no_buffers yes
uppercase no

color0 white

color2 white
color3 1793d0


pad_percents 2
top_name_width 10
minimum_size 200 30

gap_x 5
gap_y 440

lua_load allcombined.lua


own_window_colour 000000
TEXT
${image img/cpu2.png -p 0,0 -s 30x30}
${offset 35}${font Good Times:size=12}${color Orange}CPU INFORMATION ${color}${hr 2}
${font}${color}${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq}
${color lightgrey}Temperature:  ${texeci 10 sensors | grep temp | awk '!/-/' | awk '{ print $2}' | sort -r | head -n 1}
${alignc}${color #000000}${cpugraph 20,318 000000 FFFFFF}${color}
# CPU1
CPU. 1${goto 50} : ${cpu cpu1}% ${lua gradbar {100, 110, "${cpu cpu1}", 100, 50, 2, 10, 1, 0xFFFFFF, 0.25, 0x00FF00, 1, 0xFFFF00, 1, 0xFF0000, 1}}${goto 260}${color}${freq 1} MHz${image img/trans-bg240.png -p 96,105 -s 151x11}
# CPU2
CPU. 2${goto 50} : ${cpu cpu2}% ${lua gradbar {100, 125, "${cpu cpu2}", 100, 50, 2, 10, 1, 0xFFFFFF, 0.25, 0x00FF00, 1, 0xFFFF00, 1, 0xFF0000, 1}}${goto 260}${color}${freq 2} MHz${image img/trans-bg240.png -p 96,120 -s 151x11}
# CPU3
CPU. 3${goto 50} : ${cpu cpu3}% ${lua gradbar {100, 140, "${cpu cpu3}", 100, 50, 2, 10, 1, 0xFFFFFF, 0.25, 0x00FF00, 1, 0xFFFF00, 1, 0xFF0000, 1}}${goto 260}${color}${freq 3} MHz${image img/trans-bg240.png -p 96,135 -s 151x11}
# CPU4
CPU. 4${goto 50} : ${cpu cpu4}% ${lua gradbar {100, 155, "${cpu cpu4}", 100, 50, 2, 10, 1, 0xFFFFFF, 0.25, 0x00FF00, 1, 0xFFFF00, 1, 0xFF0000, 1}}${goto 260}${color}${freq 4} MHz${image img/trans-bg240.png -p 96,150 -s 151x11}
# CPU5
CPU. 5${goto 50} : ${cpu cpu5}% ${lua gradbar {100, 170, "${cpu cpu5}", 100, 50, 2, 10, 1, 0xFFFFFF, 0.25, 0x00FF00, 1, 0xFFFF00, 1, 0xFF0000, 1}}${goto 260}${color}${freq 5} MHz${image img/trans-bg240.png -p 96,165 -s 151x11}
# CPU6
CPU. 6${goto 50} : ${cpu cpu6}% ${lua gradbar {100, 185, "${cpu cpu6}", 100, 50, 2, 10, 1, 0xFFFFFF, 0.25, 0x00FF00, 1, 0xFFFF00, 1, 0xFF0000, 1}}${goto 260}${color}${freq 6} MHz${image img/trans-bg240.png -p 96,180 -s 151x11}
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 »

What i suspected.. your conky script uses the old setup! I converted the script to the new setup. Try this one..
And the reason why you can not send the script is probably because you didn't zip it..
cpuinfo.conky.gz
(1.05 KiB) Downloaded 53 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 08, 2022 2:58 pm What i suspected.. your conky script uses the old setup! I converted the script to the new setup. Try this one..
And the reason why you can not send the script is probably because you didn't zip it..

cpuinfo.conky.gz
Dang, it doesn't work. It's shows as the exact same as the one I was already using. For some reason the

Code: Select all

{image img/trans-bg240.png -p 96,105 -s 151x11}
line doesn't seem to be working
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: Mon Aug 08, 2022 5:21 pm
Dang, it doesn't work. It's shows as the exact same as the one I was already using. For some reason the

Code: Select all

{image img/trans-bg240.png -p 96,105 -s 151x11}
line doesn't seem to be working
You are not starting conky in the path of that config, this is why that image will fail. It is trying to reference that path img/trans-bg240.png but $PWD is probably ~ instead of ~/.conky/cpuinfo (or whatever the real full path to that config is).

Code: Select all

cd ~/.conky/cpuinfo #(or whatever)
conky -c ~/.conky/cpuinfo/config.conf
#or just
conky -c config.conf #(this is fine, the cd line above is the important one)
When a conky instance is started it pays attention to $PWD.
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 08, 2022 5:21 pm Dang, it doesn't work. It's shows as the exact same as the one I was already using. For some reason the

Code: Select all

{image img/trans-bg240.png -p 96,105 -s 151x11}
line doesn't seem to be working
Ok, that's strange.. and the image does exist in that subdirectory?
Did you rename the original conky script to a backup-name and rename my script to the original name? Because that image command that you just posted, i changed that in my script! That what you posted is from your script!
In my script i changed it to:

Code: Select all

{image ./img/trans-bg240.png -p 96,105 -s 151x11}
Notice the ./
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 08, 2022 6:09 pm You are not starting conky in the path of that config, this is why that image will fail....
That is probably also why the lua script for the cpu bars is not loaded! The script can't find 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 »

Koentje wrote: Mon Aug 08, 2022 6:17 pm That is probably also why the lua script for the cpu bars is not loaded! The script can't find it..
Probably. You can do relative or absolute. But relative really makes it nice later, we can share configs without having to dig around and tweak paths. But we have to get the conky instance into the PWD. :wink:
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 08, 2022 6:09 pm
TinMan1325 wrote: Mon Aug 08, 2022 5:21 pm
Dang, it doesn't work. It's shows as the exact same as the one I was already using. For some reason the

Code: Select all

{image img/trans-bg240.png -p 96,105 -s 151x11}
line doesn't seem to be working
You are not starting conky in the path of that config, this is why that image will fail. It is trying to reference that path img/trans-bg240.png but $PWD is probably ~ instead of ~/.conky/cpuinfo (or whatever the real full path to that config is).

Code: Select all

cd ~/.conky/cpuinfo #(or whatever)
conky -c ~/.conky/cpuinfo/config.conf
#or just
conky -c config.conf #(this is fine, the cd line above is the important one)
When a conky instance is started it pays attention to $PWD.
I'm not sure what $PWD is but I already tried changing the path for the old one I had and the new one provided by Koentje and that didn't seem to do anything. I tried changing the path for CPU. 1 and it still looks the same as the the other ones

https://i.imgur.com/6lqqW5R.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: Mon Aug 08, 2022 6:15 pm
TinMan1325 wrote: Mon Aug 08, 2022 5:21 pm Dang, it doesn't work. It's shows as the exact same as the one I was already using. For some reason the

Code: Select all

{image img/trans-bg240.png -p 96,105 -s 151x11}
line doesn't seem to be working
Ok, that's strange.. and the image does exist in that subdirectory?
Did you rename the original conky script to a backup-name and rename my script to the original name? Because that image command that you just posted, i changed that in my script! That what you posted is from your script!
In my script i changed it to:

Code: Select all

{image ./img/trans-bg240.png -p 96,105 -s 151x11}
Notice the ./
Are you sure? I downloaded it twice and it doesn't show the ./ in there

The image is definitely in the directory. I just copy and pasted everything to my second HDD before I did a fresh install on my SSD
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 mistake, you are right! I only added the ./ with the first image object a few lines above.
You can try and put the same 2 characters in the other image objects and see if that works!
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: Tue Aug 09, 2022 12:24 pm My mistake, you are right! I only added the ./ with the first image object a few lines above.
You can try and put the same 2 characters in the other image objects and see if that works!
I already tried it on CPU 1, unfortunately it didn't work

Edit: I tried using a different image in the same folder and it worked. I just assumed the image wasn't loading, I guess I was wrong

https://i.imgur.com/3GoVQwo.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 »

The problem is that you use that whole bunch of all kind of scripts and you really do not need all of them! The only thing you need is a lua script for the bars (like with the gpuinfo conky).
When if have a little more time i will see if i can do the same as with the gpuinfo conky i made. Scrap all these extra scripts!
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 »

just for the info:

the ./ is not necessary, but not harmful either.

Might have been a corrupted image, or some issue with that image file.

I notice the conky-manager2 there, version 2.73 that one has the "Start in Terminal" option, the first icon on the bar, so any time you get an issue select the relevant config and instead of checking the box to start it, hit that first icon up top, maybe it will give some relevant info about the failure. :wink: -Go do it on that broken image and see what it says. :D
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: Tue Aug 09, 2022 5:24 pm The problem is that you use that whole bunch of all kind of scripts and you really do not need all of them! The only thing you need is a lua script for the bars (like with the gpuinfo conky).
When if have a little more time i will see if i can do the same as with the gpuinfo conky i made. Scrap all these extra scripts!
Oh wow that would be great, thank you!

Take your time, I'm in no rush
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 8:24 pm just for the info:

the ./ is not necessary, but not harmful either.

Might have been a corrupted image, or some issue with that image file.

I notice the conky-manager2 there, version 2.73 that one has the "Start in Terminal" option, the first icon on the bar, so any time you get an issue select the relevant config and instead of checking the box to start it, hit that first icon up top, maybe it will give some relevant info about the failure. :wink: -Go do it on that broken image and see what it says. :D
Well this is odd, I tried to load them all in the conky terminal and the only one that worked was for the GPU. All the other ones I tried, the terminal opened for a split second and then it closed

Edit: I tried it in a regular terminal and this is what I got

Code: Select all

$ conky -c '/home/tinman1325/.conky/AutomatiK/cpuinfo.conky'
conky: desktop window (2800010) is subwindow of root window (1e0)
conky: window type - desktop
conky: drawing to created window (0x4200001)
conky: drawing to double buffer
conky: llua_load: cannot open allcombined.lua: No such file or directory
conky: forked to background, pid is 2681162
tinman1325@home:~$ 
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: Unable to load image 'img/cpu2.png'
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
conky: llua_do_call: function conky_gradbar execution failed: attempt to call a nil value
I don't understand why it says "conky: Unable to load image 'img/cpu2.png'" and it dowsn't load the CPU image when in the terminal. But when I load the conky normally there isn't an issue with the CPU image
Locked

Return to “Compiz, Conky, Docks & Widgets”