You are not logged in.

#841 2018-02-05 21:43:33

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Show us your conky

martix wrote:

Indeed, I can read those files in the BAT0 folder without sudo. I'm wondering why I needed sudo, when I tried to edit conkyrc on an ubuntu machine?
Also when I gave conkyrc from Bunsenlabs to users on different distros, without sudo it did not show all the data (e.g. not for fan speed, battery, etc.).

Something must be wrong with these machines' permissions.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#842 2018-02-05 22:07:35

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Show us your conky

^ I think some distributions now have sysfs restrictions in place, my stretch-based VM won't let me read the kernel ring buffer as a normal user.

Offline

#843 2018-02-05 22:23:29

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,710

Re: Show us your conky

Indian wrote:

I can use the ragamarix draw_bg.lua in ascii with conky 1.10.6 adding a main function

function conky_main()
    return ''
end

No.
This isn't working here.
So that we don't get caught up in each other,
talking about it, it has to look like this:
draw.th.png

Offline

#844 2018-02-06 11:16:30

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Show us your conky

Does someone maybe know why this lua script (shipped with #BĹ) is not work anymore?

...

Edit: Meanwhile figured it out, changing to new syntax works fine.

Last edited by martix (2018-02-07 12:10:16)

Offline

#845 2018-02-06 12:16:20

Indian
Member
Registered: 2018-02-05
Posts: 23

Re: Show us your conky

I found the problem and the solution in this post i change the two scripts and the conky config. In bargraph_small.lua i call the function set_source_rgba and in the conky config file i only call bargraph_small.
I post the scripts in gitlab bargraph_small and draw1
In bargraph_small you have to change the line 86

package.path = "/home/btt/.conky/?.lua"

to the directory where you have both scripts. To modify the background you have to change the line number 208.

conky_draw_bg(cr, 20, 0, 0, tonumber(conky_window.width), tonumber(conky_window.height), 0x000000, 0.4)

Offline

#846 2018-02-06 21:12:11

Alpetjr
Member
Registered: 2018-01-11
Posts: 13

Re: Show us your conky

martix wrote:
TeoBigusGeekus wrote:
martix wrote:

Recently a general question regarding conky popped in my mind:

Getting things like battery info or fan info grabs data from the root part of the system.

However when I edit conkyrc, I do not need sudo (i.e. root privileges).

Is there maybe a genaral explanation how conky gets root data without having root privileges?

You don't need to be root to read your system's /proc and /sys folders.

Look at your /sys/class/power_supply/BAT0 file, which has info about your battery; anyone can read it.

Indeed, I can read those files in the BAT0 folder without sudo. I'm wondering why I needed sudo, when I tried to edit conkyrc on an ubuntu machine?
Also when I gave conkyrc from Bunsenlabs to users on different distros, without sudo it did not show all the data (e.g. not for fan speed, battery, etc.).

I,m using Mate and I don't have to be root to show temps or battery.

${voffset 6}${goto 15}ACPI: ${color FFFFFF}${acpitemp}°F 
${color}HDD: ${color FFFFFF}${hddtemp /dev/sda}°F  ${color}
${voffset 4}${font StyleBats:size=9.9}${color2}k${voffset -2}${font DroidSansFallback:size=8.39}${color0}${offset 2}CPU Temp: $alignr${execi 600 sensors -f | grep 'Core 0' | awk '{print $3}' | cut -c2-9}
${exec sensors | grep "cpu_fan:" | sed 's/fan1/Cpu Fan/'}

Battery capacity:$alignr${execi 60 acpi | grep -Eo '[0-9]+%'}
remaining:$alignr${execi 60 acpi | grep -Eo '(:?[0-9]+){3}'}

with my Battery I have a extra % in it but it works. I even have it in lua with a bargragh and it works. The problem I have is showing Network speed in lua. if it is using bandwith it doesn't show it in graduated with speed. if I am downloading it is max, even if it is a slow download.

Offline

#847 2018-02-06 21:29:39

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Show us your conky

Head_on_a_Stick wrote:

^ I think some distributions now have sysfs restrictions in place, my stretch-based VM won't let me read the kernel ring buffer as a normal user.

Strange indeed. What'd be the purpose of these restrictions I wonder?


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#848 2018-02-07 10:06:10

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Show us your conky

unklar wrote:

^ Thank you, loutch.

No, I don't have a chance. :8

I thought it was because of the writing "Japan", too.

But now I have found it, in both Conky's must be in the text.lua
to comment out the line (99). Then the display is correct. big_smile

		{
			text=conky_parse("${time %H:%M}"),
			font_name="FreeSans",
			font_size=36,
			h_align="c",
			bold=true,
			x=200,
			y=100,
			reflection_alpha=0.7,
			reflection_length=0.7,
			colour={{0,col0,1},{1,colbg,1}},
--			radial={0,-0,0,0,-80,70}        <---
		},

https://cdn.scrot.moe/images/2018/01/24/fehler_behoben.jpg

But I don't know anything about Lua.
I'm sure you know better than that.   wink

Thanks a lot unklar to solve this problem, I had the same lua problem, now I can replay with text.lua wink:
mini_18020711101874872.png

Offline

#849 2018-02-07 12:16:14

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Show us your conky

^Nice conky, gives a great overview.

Does the way using LUA with
"lua_load = '$HOME/.config/conky/LUA/draw-bg.lua'," in conky.config and

"${lua conky_draw_bg 15 0 0 0 0 0x000000 0.25}" in conky.text

still gives a blinking conky without a composite manager?

Offline

#850 2018-02-07 13:31:28

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Show us your conky

thx martix, I'm not using draw_bg.lua anymore, I don't know why it's not working with my conky.v.10 version  hmm

Offline

#851 2018-02-07 14:33:04

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Show us your conky

@ragamatrix If I've seen correctly, there are two ways using it:

In conky.config:
lua_load = '$HOME/.config/conky/LUA/draw-bg.lua',

and

in conky.text:
${lua conky_draw_bg 15 0 0 0 0 0x000000 0.25}

OR

Both lines in conky.config:

lua_load = '$HOME/.config/conky/LUA/draw-bg.lua',
lua_draw_hook_pre = 'draw_bg 15 0 0 0 0 0x000000 0.25',

Do both of these methods refuse to work?

Last edited by martix (2018-02-07 14:35:03)

Offline

#852 2018-02-07 15:28:03

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,710

Re: Show us your conky

ragamatrix wrote:

Thanks a lot unklar to solve this problem, I had the same lua problem, now I can replay with text.lua  wink
mini_18020711101874872.png

^ ragamatrix, always happy to help, if I can help (but that was coincidence)  lol

martix wrote:

still gives a blinking conky without a composite manager?

you should post the upper part of your conky.conf (is that openbox/compton?)

Offline

#853 2018-02-07 16:38:51

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Show us your conky

@unklar It's working fine for me (with openbox/compton), I'm just asking if anyone is still having that issue with conky. However I guess here every user has a composite manager, so that might not be an issue at all.

Offline

#854 2018-02-08 09:56:46

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,710

Re: Show us your conky

wink

Offline

#855 2018-02-08 20:16:11

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,710

Re: Show us your conky

https://forums.bunsenlabs.org/viewtopic … 929#p67929

^ It was tedious (as a Lua Ignorant  big_smile ) but a very big improvement with the syntax 1.10 in Conky and the draw_bg.lua script.
The "corners" are still uneven. Transparency works.
The Conky can be moved with' Alt+Right mouse button'. smile

indian1.th.png  indian2.th.png

Great work!

Offline

#856 2018-02-09 01:02:05

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Show us your conky

@unklar I suspect that the corner issue might come from moving around the conky. At least the corners looked perfect here, but now after trying alt+right mouse button (which worked great) I realized that those corners do not look good anymore.

There is a question I'd like to ask.

lua_draw_hook_pre means: "This function, if defined, will be called by Conky through each iteration before drawing to the window. Requires X support. Takes any number of optional arguments. Use this hook for drawing things on top of what Conky draws."

With draw-bg it's e.g.: lua_draw_hook_pre = 'draw_bg 15 0 0 0 0 0x000000 0.25',

Now what is the difference (in plain human language) between this OR using ${lua conky_draw_bg 15 0 0 0 0 0x000000 0.25} in conky.text?

Offline

#857 2018-02-09 06:46:30

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Show us your conky

I've got a new gpu and a 4k monitor, so conky space has dramatically increased.

DxCBtXIt.jpg

dbItcZbt.jpg


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#858 2018-02-09 08:19:15

Indian
Member
Registered: 2018-02-05
Posts: 23

Re: Show us your conky

martix wrote:

With draw-bg it's e.g.: lua_draw_hook_pre = 'draw_bg 15 0 0 0 0 0x000000 0.25',

Now what is the difference (in plain human language) between this OR using ${lua conky_draw_bg 15 0 0 0 0 0x000000 0.25} in conky.text?

If you call draw_bg with lua_draw_hook_pre the shadow appears at the background, if you call draw_bg with lua_draw_hook_post the text appears at bottom and the shadow is in the top, if you call draw_bg in the text i think it's the same as lua_draw_hook_pre.

Offline

#859 2018-02-09 10:42:40

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,710

Re: Show us your conky

^ Thank you very much, Indian.  smile

@martix,

In addition, I would like to mention our Conkystador, Sector11, in connection with it:
- transparency
- Type of desktop and composite manager used

answer.  e.g.
https://forums.bunsenlabs.org/viewtopic … 059#p11059
https://forums.bunsenlabs.org/viewtopic … 735#p27735


We hope to include as much as possible in the syntax of version 1.10 as possible.  wink


@Teo,
this is verry good. Still, I don't quite understand what you mean (I'm already old)  ]:D  lol

Offline

#860 2018-02-09 10:47:46

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Show us your conky

martix wrote:

@ragamatrix If I've seen correctly, there are two ways using it:

In conky.config:
lua_load = '$HOME/.config/conky/LUA/draw-bg.lua',

and

in conky.text:
${lua conky_draw_bg 15 0 0 0 0 0x000000 0.25}

OR

Both lines in conky.config:

lua_load = '$HOME/.config/conky/LUA/draw-bg.lua',
lua_draw_hook_pre = 'draw_bg 15 0 0 0 0 0x000000 0.25',

Do both of these methods refuse to work?

Thanks, I'll try every draw_bg.lua stuffs when I'll come back, I'm leaving for few days: no more linux tweaking  big_smile

Offline

Board footer

Powered by FluxBB