Help using conky

Hi, I’ve recently started using endeavour, I like it a lot and I am happy to see many users from other forums too. I am trying to use conky, but I must be doing something very wrong. I would like to adapt this conky from mabox:

conky.config = {

	own_window = true,
	own_window_type = 'desktop',
-- own_window_argb_visual yes
-- own_window_argb_value 125
	own_window_transparent = true,
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
	own_window_colour = '#000000',
	own_window_class = 'Conky',
	own_window_title = 'Mabox Quakeworld Monitor Conky',

	gap_x = 15,
	gap_y = 50,
	alignment = 'top_right',
	minimum_width = '200',
	minimum_width = 200,




	use_xft = true,
	font = 'Cantarell:size=9',
	xftalpha = 1,
	override_utf8_locale = true,
	draw_shades = false,--yes
	default_shade_color = '#000000',
	draw_outline = false,
	default_outline_color = '#000000',


	color2 = '#777777',
	color3 = '#006600',
	cpu_avg_samples = 2,
	default_color = '#FFFFFF',

	draw_borders = false,--yes

	stippled_borders = 5,
	border_inner_margin = 5,
	border_outer_margin = 0,
	border_width = 2,


	background = true,
	no_buffers = true,
	imlib_cache_size = 0,

	double_buffer = true,
	update_interval = 1,


};

conky.text = [[
${voffset 8}$color${font Cantarell:size=16}${time %A}$font${voffset -18}$alignr${color3}${font Cantarell:size=38}${time %e}$font
$color${voffset -20}$color${font Cantarell:size=18}${time %B}$font${voffset -1} $color${font Cantarell:size=20}${time %Y}$font
#${voffset 10}$alignr$color Kraków (PL) ${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPKK temperature temperature 15}°C
#
${voffset 10}${goto 40}${color}CPU$alignr$cpu%
$color2${goto 40}$alignr${cpubar 4,165}
${voffset 5}${goto 40}$font$color2${top name 1}$alignr$color${top cpu 1}%
${goto 40}$color2${top name 2}$alignr$color${top cpu 2}%
${goto 40}$color2${top name 3}$alignr$color${top cpu 3}%
${goto 40}$color2${top name 4}$alignr$color${top cpu 4}%
#
${voffset 10}${goto 40}${color}RAM$alignr$mem/$memmax
$color2${goto 40}$alignr${membar 4,165}
${goto 40}${voffset 5}$color2${top_mem name 1}$alignr$color${top_mem mem_res 1}
${goto 40}$color2${top_mem name 2}$alignr$color${top_mem mem_res 2}
${goto 40}$color2${top_mem name 3}$alignr$color${top_mem mem_res 3}
${goto 40}$color2${top_mem name 4}$alignr$color${top_mem mem_res 4}
#
${voffset 10}$alignr disk ${color2}${fs_used /} - ${fs_size /}
$alignr$color memory ${color2}$mem - $memmax
#${alignr}${color2}${font Cantarell:size=9}swap $swapmax - $swap
#
${voffset 10}$alignr${color} Mabox Linux ${execi 10000 awk -F'=' '/DISTRIB_RELEASE=/ {printf $2" "} /CODENAME/ {print $2}' /etc/lsb-release}
#
${voffset 10}$alignr${execi 1200 whoami}@${nodename}
${alignr}${color2}${font Cantarell:size=9}uptime ${color}${uptime_short}
${alignr}${color2}${font Cantarell:size=9}${alignr}kernel ${color}${kernel}
${alignr}${color2}${font Cantarell:size=9}${alignr}arch ${color}${machine}
${alignr}${color2}${font Cantarell:size=9}${alignr}filesystem ${color}${fs_type}
${voffset 10}${alignr}${color} available updates ${color3}${font Cantarell:bold:size=10}${execpi 1800 pamac checkupdates -aq| wc -l}${font}${color}
${alignr}${color} installed pkgs: ${color2}${execi 10000 pacman -Q | wc -l}
${alignr}${color} branch: ${color2}${execi 10000 pacman-mirrors -G}
]];

Could you help me? Even if it seems obvious, what should I do?
Thanks a lot

Hi and welcome to EndeavourOS!

Install conky using shell command

yay -S conky

Create a file named .conkyrc in ~/.config/, where ~ means your home folder.
Copy paste the config you have in this .conkyrc file you just created.

Run conky in a shell to launch it. If there is some flicker, use conky -b command to launch.
If conky doesn’t automatically detect your custom config, you need to append -c ~/.config/.conkyrc to the command.
Once conky is launched, you can close the terminal.

Edit:
The config seems to put conky above other windows. If this is not the behaviour you desire, i.e. you want conky to appear only on the desktop, and behind other windows, then change

own_window = true,

to

own_window = false,

This option is right at the beginning at your config.
If you do intend to have conky above other windows too, then no need to make any change.

2 Likes

OK—have you installed conky? I know that sounds basic, but I need to know what
you need. I make conky scripts—You need a start script in your home folder & a defined place for conky scripts. I create a .conky for all my conky stuff. A typical startup script looks like:


killall conky

conky -c ~/.conky/conkyrc_A-ring -q ;

exit 0

One of my conky scripts: https://www.pling.com/p/1198875/

2 Likes

Just a note - it appears to work OK (but with a couple of complaints about pamac that I haven’t tracked yet).

Assuming that conky has been installed (recommend yay conky-cairo for future uses!) all you need is a place to put conky stuff. Either ~/.conky or .config/conky are good reusable locations. I recommend always using the conky -c filename & format for starting conkys - doesn’t matter whether by script or command line.

As I mentioned - it appears to be functional (so small it’s hard to tell on a 4K screen) - so that is one worry you don’t have…

Help is available if you want it, but it can lead to a lot of time invested (see Share your Desktop entries for examples)

2 Likes

Thank you¡¡ I am using lxqt. I installed conky, if I run conky from terminal a default one appeared before, now there’s some mistake on the terminal:

[jacqueline@jacqueline-k53e ~]$ conky
conky: Syntax error (/home/jacqueline/.conkyrc:3: syntax error near 'middle_right') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: [string "..."]:159: attempt to call a nil value (global 'loadstring')

This is the conkyrc I copied and put inside .config/conky:

--[[
Conky, a system monitor, based on torsmo

Any original torsmo code is licensed under the BSD license

All code written since the fork of torsmo is licensed under the GPL

Please see COPYING for details

Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
Copyright (c) 2005-2019 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
]]

conky.config = {
    alignment = 'top_left',
    background = false,
    border_width = 1,
    cpu_avg_samples = 2,
    default_color = 'white',
    default_outline_color = 'white',
    default_shade_color = 'white',
    double_buffer = true,
    draw_borders = false,
    draw_graph_borders = true,
    draw_outline = false,
    draw_shades = false,
    extra_newline = false,
    font = 'DejaVu Sans Mono:size=12',
    gap_x = 60,
    gap_y = 60,
    minimum_height = 5,
    minimum_width = 5,
    net_avg_samples = 2,
    no_buffers = true,
    out_to_console = false,
    out_to_ncurses = false,
    out_to_stderr = false,
    out_to_x = true,
    own_window = true,
    own_window_class = 'Conky',
    own_window_type = 'desktop',
    show_graph_range = false,
    show_graph_scale = false,
    stippled_borders = 0,
    update_interval = 1.0,
    uppercase = false,
    use_spacer = 'none',
    use_xft = true,
}

conky.text = [[
${color grey}Info:$color ${scroll 32 Conky $conky_version - $sysname $nodename $kernel $machine}
$hr
${color grey}Uptime:$color $uptime
${color grey}Frequency (in MHz):$color $freq
${color grey}Frequency (in GHz):$color $freq_g
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color grey}CPU Usage:$color $cpu% ${cpubar 4}
${color grey}Processes:$color $processes  ${color grey}Running:$color $running_processes
$hr
${color grey}File systems:
 / $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
${color grey}Networking:
Up:$color ${upspeed} ${color grey} - Down:$color ${downspeed}
$hr
${color grey}Name              PID     CPU%   MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
]]

, I don’t know how to choose another from mabox.
If I try to use conky-manager I can see the preview from the themes but those never appear on screen.
I have two examples in the folder:
LSD-Conky.conkyrc
and
sysinfo_grey.conkyrc
What is the terminal command to test if they work? and how can I start one of them on boot?
I tried but the result is very bad, it looks like screen is wrong, the image is moved and chopped?


Sorry for these very basic questions. Thanks a lot

Thank you, I will try conky-cairo.

How should I call that script? I downloaded your files, thank you, how can I see if they can work here?

Weird graphic glitches are usually a matter of settings in the conky, in the upper portion. Also I found a couple of items that I would do differently (!) in the one you posted - so here it is ‘fixed’ (assuming you have pamac, which I don’t, and I have no idea what pamac-mirrors does!)

A style suggestions - if you are using a conky variable (starts with $), it is safer/clearer if you always surround it with braces {} - such as ${alignr}. I did this on the one here.

Conky tweaked (but fonts may be too big)

conky.config = {

own_window = true,

own_window_type = ‘desktop’,

– own_window_argb_visual yes

– own_window_argb_value 125

own_window_transparent = true,

own_window_hints = ‘undecorated,below,sticky,skip_taskbar,skip_pager’,

own_window_colour = ‘#000000’,

own_window_class = ‘Conky’,

own_window_title = ‘Mabox Quakeworld Monitor Conky’,

gap_x = 15,

gap_y = 50,

alignment = ‘top_right’,

minimum_width = ‘300’,

minimum_width = 300,

use_xft = true,

font = ‘Cantarell:size=14’,

xftalpha = 1,

override_utf8_locale = true,

draw_shades = false,–yes

default_shade_color = ‘#000000’,

draw_outline = false,

default_outline_color = ‘#000000’,

color2 = ‘#777777’,

color3 = ‘#006600’,

cpu_avg_samples = 2,

default_color = ‘#FFFFFF’,

draw_borders = false,–yes

stippled_borders = 5,

border_inner_margin = 5,

border_outer_margin = 0,

border_width = 2,

background = true,

no_buffers = true,

imlib_cache_size = 0,

double_buffer = true,

update_interval = 1,

};

conky.text = [[

${voffset 8}${color}${font Cantarell:size=16}${time %A}${font}${voffset -18}${alignr}+${color3}${font Cantarell:size=38}${time %e}${font}

${color}${voffset -20}${color}${font Cantarell:size=18}${time %B}${font}${voffset -1} ${color}${font Cantarell:size=20}${time %Y}${font}

#${voffset 10}${alignr}$color Kraków (PL) ${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPKK temperature temperature 15}°C

${voffset 10}${goto 40}${color}CPU${alignr}${cpu cpu0}%

$color2${goto 40}${alignr}${cpubar 4,165}

${voffset 5}${goto 40}${font}${color2}${top name 1}${alignr}${color}${top cpu 1}%

${goto 40}$color2${top name 2}${alignr}$color${top cpu 2}%

${goto 40}$color2${top name 3}${alignr}$color${top cpu 3}%

${goto 40}$color2${top name 4}${alignr}$color${top cpu 4}%

${voffset 10}${goto 40}${color}RAM${alignr}$mem/$memmax

$color2${goto 40}${alignr}${membar 4,165}

${goto 40}${voffset 5}${color2}${top_mem name 1}${alignr}${color}${top_mem mem_res 1}

${goto 40}$color2${top_mem name 2}${alignr}${color}${top_mem mem_res 2}

${goto 40}$color2${top_mem name 3}${alignr}${color}${top_mem mem_res 3}

${goto 40}$color2${top_mem name 4}${alignr}$color${top_mem mem_res 4}

${voffset 10}${alignr} disk ${color2}${fs_used /} - ${fs_size /}

${alignr}${color} memory ${color2}$mem - $memmax

#${alignr}${color2}${font Cantarell:size=9}swap $swapmax - $swap

${voffset 10}${alignr}${color} EndeavourOS Linux ${execi 10000 awk -F’=’ ‘/DISTRIB_RELEASE=/ {printf $2" "} /CODENAME/ {print $2}’ /etc/lsb-release}

${voffset 10}${alignr}${execi 1200 whoami}@${nodename}

${alignr}${color2}${font Cantarell:size=14}uptime ${color}${uptime_short}

${alignr}${color2}${font Cantarell:size=14}${alignr}kernel ${color}${kernel}

${alignr}${color2}${font Cantarell:size=14}${alignr}arch ${color}${machine}

${alignr}${color2}${font Cantarell:size=14}${alignr}filesystem ${color}${fs_type}

${voffset 10}${alignr}${color} available updates ${color3}${font Cantarell:bold:size=14}${execpi 1800 checkupdates | wc -l}${font}${color}

${alignr}${color} installed pkgs: ${color2}${execi 10000 pacman -Q | wc -l}

${alignr}${color} branch: ${color2}${execi 10000 pacman-mirrors -G}

]];

1 Like

If you save it as, for example, test-conkyrc in the .conky directory, then:
conky -c ~/.conky/test-conkyrc &
should run it fine. killall conky will stop it for whatever reason (needs editing, perhaps) I think it need a bit more colour for example!

Thank you for checking it¡ I will go on playing, it complains of some new problem, if it has to do with the syntax I have a file that says convert.lua but I don’t know how to use it.

[jacqueline@jacqueline-k53e ~]$ conky -c ~/.config/conky/sysinfo_grey.conkyrc & sleep 1s
[1] 10323
conky: Syntax error (/home/jacqueline/.config/conky/sysinfo_grey.conkyrc:5: unexpected symbol near '<\226>') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: [string "..."]:147: attempt to index a nil value (local 'settings')
[1]+  Exit 1                  conky -c ~/.config/conky/sysinfo_grey.conkyrc
[jacqueline@jacqueline-k53e ~]$

‘~/.conky/conky-startup.sh’

Should do it for you…Contact me back with problems. That “assumes” you put the startup script in your .conky

Put your arguments in the script.

1 Like

I like putting everything in the .conky folder to keep it all in order.

The “old syntax” error is not really an error—just means that the script was made for the older version of conky & the author has not updated it yet. conky will update old scripts to the V10 format on the fly. I’m updating all of my scripts when I have time.

As for the line 147 error—there is something wrong in the “settings” part of the line…If you tell me where you got the script, I’ll take a look at it.

1 Like

Thank you¡ the start up is there, I can’t make it appear on screen but I will keep on trying.

I do 2 things:

  1. I make a startup for when I login…take a look at “autostart” settings for the WM you are using.
  2. I keep the command in my used terminal commands.

The terminal will log the errors—then you can post them here.

You could check this Thread, you have the new syntax with conky and an example conky file.

2 Likes

Thank you, I will read it and try to understand a bit more. I tried your example and it is working¡¡¡¡

1 Like

PM me if you need help…I’m in & out of here regularly.

Take a look here: https://www.pling.com/s/Linux/browse/cat/124/order/latest/

For Conkys…My stuff is here also.

1 Like

Hi. I’ve advanced a little bit. I tried to convert one conky and now it appears on the desktop, but it doesn’t look ok yet.
Could it be possible that lxqt lacks some compositor that manjaro and Mabox had? Because I copied the conkies from those and it used to work there.


Thank you

I would be looking at the window settings: such as

--# Create 'own_window' type. Makes Conky behave like other panels.
	own_window = true,
	own_window_transparent = true,
--own_window_type = 'desktop',
	own_window_hints = 'below,sticky,undecorated,skip_taskbar,skip_pager',
--	own_window_hints = 'below,undecorated,skip_taskbar,skip_pager',
	own_window_type = 'normal',
	own_window_argb_visual = true,

	--###
--# Some distros require the following lines for true transparency.
--# BOTH of these lines need to be Commented/Uncommented in tandem.

  --own_window_argb_visual = true,
  --own_window_argb_value 255

--###
--# Force images to redraw when they change.
	imlib_cache_size = 1,

--###
--# Use double buffering? Reduces flicker.
	double_buffer = true,

The above is part of an example that works on my system (with some comments on usage)

Window types can be several things - like “normal”, “desktop”, “override”, “panel” or “dock”. No penalty for trying other settings. Double buffer being on, or transparency type etc can also have an effect - can’t tell what happening with that one without the code.

Here’s a place with ALL the information (more than you want to know) but a great reference for specifics when needed:
http://ifxgroup.net/conky.htm