Conky on Wayland

I have Three Conkys on Hyprland and Qtile (Wayland), so it may work on Sway wm. To use Conky on wayland, add these two lines on your Conky script.

conky.config = {
out_to_x = false,
out_to_wayland = true,

Change own_window_type to ‘override’ ( own_window_type = ‘override’,)

If you add these lines, Conky will works on Wayland without any issue. But Conky will not load on Xorg . I am using a panel Conky with all necessary widget, a dock Conky for detailed system information and a keybinding Conky to show all keyboard shortcuts, Manjaro announcements and Calendar.

dock conky:-
Install screenfetch, sed, grep, curl and jq.

Conky graphs(cpugraph, network upspeedgraph and downspeedgraph) are not working on wayland, so I removed it. Removing Conky graphs will reduce Cpu usage

 conky.config = {
    out_to_x = false,
    out_to_wayland = true,
	alignment = 'middle_right',
	background = true,
	update_interval = 1,

	cpu_avg_samples = 2,
	net_avg_samples = 2,

	override_utf8_locale = true,

	double_buffer = true,
	no_buffers = true,

--text_buffer_size 10240
	imlib_cache_size = 0,

--##########
-- Windows #
--##########
	own_window_class = 'dock',
	own_window = true,
	own_window_type = 'override',
	own_window_argb_visual = true,
	own_window_argb_value = 85,
	own_window_transparent = false,
	own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',


	border_inner_margin = 0,
	border_outer_margin = 0,

	minimum_width = 380, minimum_height = 400,
	maximum_width = 380,

--###########
-- Graphics #
--###########
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,

--#######
-- Text #
--#######
	use_xft = true,
	xftalpha = 0.8,
	font = 'Sans:size=12',

	uppercase = false,

	default_color = '#00FF40',
	show_graph_scale = false,
    show_graph_range = false,

--#######
-- Code #
--#######
	own_window_colour = '#000000',
	gap_x = 1,
	gap_y = 1,
};

conky.text = [[
${voffset -10}${color FFFFFF}${font DejaVu Sans Mono:size=2}${execi 130000 screenfetch -L -N  | sed 's/^/\t/' | sed 's/ *$//'}${color 00FF40}
${color FFFFFF}${font Roboto:size=28}${voffset -68}${offset 90}${exec lsb_release -d | cut -f 2| tr "[:upper:]" "[:lower:]"}${color 00FF40}
${font Roboto Condensed:size=12}${voffset -10}${offset 80}Edition: ${color FFA500}${font Roboto Condensed:size=11}${execi 130000 awk -F= '/ID=/{printf $2" "} /RELEASE=/{printf $2" "} /NAME=/{print $2}' /etc/lsb-release}
${color FFA500}${voffset -5}$hr$
${color 00FF40}${font Roboto Condensed:size=12}Processor: ${color }${alignr 6}${execi 130000 cat /proc/cpuinfo | grep 'model name' | cut -c 14-18 | uniq} ${execi 130000 cat /proc/cpuinfo | grep 'model name' | cut -c 23-26 | uniq} ${execi 130000 cat /proc/cpuinfo | grep 'model name' | cut -c 32-39 | uniq} ${execi 130000 cat /proc/cpuinfo | grep 'model name' | cut -c 45-51 | uniq}
${alignc}${machine}${color FFA500} @ $freq(MHz)${color 00FF40}
System Errors:  ${color FFA500}${if_match "0" < "${execpi 3600 systemctl --failed | grep 'listed' | cut -d' ' -f1}"}${endif}$alignr ${execpi 3600 systemctl --failed | grep 'listed' | cut -d' ' -f1}  failed ${color 00FF40}
Branch: ${color FFA500}${execi 130000 cat /etc/pacman-mirrors.conf | grep -i "Branch =" | sed -E "s/(# )*Branch = //g"}
${voffset -5}${color FFA500}$hr${color 00FF40}
${voffset }Kernel: ${color FFA500}${kernel}${color 00FF40}
${voffset -5}${color FFA500}$hr${color 00FF40}
Uptime: ${color FFA500}$uptime_short${color 00FF40}
#Power: ${color FFA500}${battery_percent BAT0}%${color 00FF40}
#Local IP: ${color FFA500}${addr eno1}${color 00FF40}
${voffset -5}${color FFA500}$hr${color 00FF40}
RAM: ${color FFA500}$mem / $memmax$alignr${color 00FF40}$memperc% ${membar 10}{color 00FF40}
Swap: ${color FFA500}${swap} / ${swapfree}${color 00FF40} $swapperc% ${swapbar 10}
#CPU: ${color FFA500}${cpu cpu0}%${color 00FF40}${alignr}${color 00FF40}${cpugraph 18,200}${color 00FF40}
CPU: ${color FFA500}${cpu cpu0}%${color 00FF40}
${color FFA500}$hr${color 00FF40}
# Signal: ${color FFA500}${wireless_link_qual eno1}%${color 00FF40}
#${font Roboto Condensed:size=12.2} Upload: ${color FFA500}${upspeed eno1}${color 00FF40}${alignr}${upspeedgraph eno1 18,150 00FF40 00FF40}
${font Roboto Condensed:size=12.2} Upload: ${color FFA500}${upspeed eno1}${color 00FF40}
${offset 40}Total Sent: ${color FFA500}${totalup eno1}${color 00FF40}
#${font Roboto Condensed:size=12.2} Download: ${color FFA500}${downspeed eno1}${color 00FF40}${alignr}${downspeedgraph eno1 18,150 00FF40 00FF40}
${font Roboto Condensed:size=12.2} Download: ${color FFA500}${downspeed eno1}${color 00FF40}
${offset 40}Total Received: ${color FFA500}${totaldown eno1}${color 00FF40}
${color FFA500}$hr${color 00FF40}
Home: ${color FFA500}${fs_used /} / ${fs_size /}${alignr}${color 00FF40}${fs_used_perc /home}% ${fs_bar 10,100 /}
${offset 55}${color FFA500}${fs_free /} free${color 00FF40}
${voffset 5}${color FFA500}Read: $color${diskio_read}$alignr${color FFA500}Write: $color${diskio_write}
${color FFA500}$hr${color 00FF40}
${color 00FF40}Process ${color 00FF40}${alignr}CPU%
${color FFA500}${top name 1}${alignr}${top cpu 1}
${color FFA500}${top name 2}${alignr}${top cpu 2}
${color FFA500}${top name 3}${alignr}${top cpu 3}
${color FFA500}${top name 4}${alignr}${top cpu 4}
${color FFA500}${top name 5}${alignr}${top cpu 5}
#${color FFA500}${top name 6}${alignr}${top cpu 6} 
${color FFA500}$hr${color 00FF40}
${color 00FF40}Process ${color 00FF40}${alignr}RAM
${color FFA500}${top_mem name 1}${alignr}${top_mem mem_res 1}
${color FFA500}${top_mem name 2}${alignr}${top_mem mem_res 2}
${color FFA500}${top_mem name 3}${alignr}${top_mem mem_res 3}
${color FFA500}${top_mem name 4}${alignr}${top_mem mem_res 4}
${color FFA500}${top_mem name 5}${alignr}${top_mem mem_res 5}
#${color FFA500}${top_mem name 6}${alignr}${top_mem mem_res 6}
]];

1 Like