How to enable real transparency for Conky
I recently started using Conky for the first time, in what feels forever. It was quick and easy to setup, except for one thing; getting real transparency to work. See this example image of how it looked before I got it working.
I remeber having the same issue with Conky the first time I tried it almost two decades ago. Thankfully. After trying a billion sugetions from various Internet forums, I found a solution that actually worked.
I found the solution on the Arch Linux wiki page for Conky. I simply had to make sure to have these settings:
conky.config = {
own_window = true,
own_window_transparent = true,
own_window_argb_visual = true,
own_window_type = 'desktop',
}
Don’t forget that for real transparency to work, you must have a composite manager running.
My Conky configuration
If you would like to copy my simple configuration:
conky.config = {
alignment = 'top_right',
cpu_avg_samples = 2,
default_color = 'white',
double_buffer = true,
extra_newline = false,
font = 'DejaVu Sans Mono:size=10',
gap_x = 50,
gap_y = 40,
minimum_height = 5,
minimum_width = 5,
net_avg_samples = 2,
no_buffers = true,
out_to_x = true,
own_window = true,
own_window_class = 'Conky',
own_window_type = 'desktop',
own_window_transparent = true,
own_window_argb_visual = true,
show_graph_range = false,
show_graph_scale = false,
update_interval = 1.0,
use_spacer = 'none',
use_xft = true,
}
conky.text = [[
${font Mono:style=Bold:size=10}System $hr${font}
CPU: $alignr$cpu%
RAM: $alignr$memperc%
Swap: $alignr$swapperc%
${font Mono:style=Bold:size=10}Temperature $hr${font}
CPU: $alignr${hwmon 2 temp 1}°C
GPU: $alignr${execi 30 sensors amdgpu-pci-0d00 | grep "junction:" | awk '{print $2}' | sed 's/+//;s/\..*$//'}°C
SSD: $alignr${execi 30 sensors nvme-pci-0100 | grep "Composite:" | awk '{print $2}' | sed 's/+//;s/\..*$//'}°C
${font Mono:style=Bold:size=10}Storage $hr${font}
Total: $alignr${fs_size /}
Free: $alignr${fs_free /}
]]