conky
conky copied to clipboard
[Bug]: goto is not behaving normally under wayland
What happened?
goto is not behaving normally under wayland and cannot see where the text goto is going.
Version
1.18.1
Which OS/distro are you seeing the problem on?
Arch Linux
Conky config
--[[
#=====================================================================================
# all_archlinux
# Date : 2022/03/16
# Author : Kelen.YC.Liu
# Version : None
# License : Distributed under the terms of GNU GPL version 2 or later
# Documentation :
# Information : Updated on the configs of Erik Dubois (arcolinux) and zagortenay333.
#=====================================================================================
# arcolinux
# Date : package-date
# Author : Erik Dubois at http://www.erikdubois.be
# Version : package-version
# License : Distributed under the terms of GNU GPL version 2 or later
# Documentation : http://erikdubois.be/
#======================================================================================
# CONKY
# For commands in conky.config section:
# http://conky.sourceforge.net/config_settings.html
#
# For commands in conky.text section:
# http://conky.sourceforge.net/variables.html
#
# A PDF with all variables is provided
#=====================================================================================
# FONTS
# To avoid copyright infringements you will have to download
# and install the fonts yourself sometimes.
#=====================================================================================
# GENERAL INFO ABOUT FONTS
# Go and look for a nice font on sites like http://www.dafont.com/
# Download and unzip - double click the font to install it (font-manager must be installed)
# No font-manager then put fonts in ~/.fonts
# Change the font name in the conky
# The name can be known with a command in the terminal: fc-list | grep "part of name"
# Change width and height of the conky according to font
# Reboot your system or fc-cache -fv in terminal
# Enjoy
#=====================================================================================
# FONTS FOR THIS CONKY
# http://www.dafont.com/style-bats.font
#======================================================================================
# Titus Modifications
#======================================================================================
# Changed time from Roboto to GE Inspira which is a base Conky Gotham Addon
# Changed Drives from 2 to 3
# Modified one_window_type from desktop to normal for KDE compatibility
# Modified Ethernet settings
# Modified Pink Lines to Bright Blue
# Removed Extra symbols and incorrect formatting
#======================================================================================
]]
conky.config = {
out_to_x = false,
out_to_wayland = true,
--Various settings
background = true, -- forked to background
cpu_avg_samples = 2, -- The number of samples to average for CPU monitoring.
diskio_avg_samples = 10, -- The number of samples to average for disk I/O monitoring.
double_buffer = true, -- Use the Xdbe extension? (eliminates flicker)
if_up_strictness = 'address', -- how strict if testing interface is up - up, link or address
net_avg_samples = 2, -- The number of samples to average for net data
no_buffers = true, -- Subtract (file system) buffers from used memory?
temperature_unit = 'celsius', -- fahrenheit or celsius
text_buffer_size = 2048, -- size of buffer for display of content of large variables - default 256
update_interval = 2, -- update interval
imlib_cache_size = 0, -- disable image cache to get a new spotify cover per song
--Placement
alignment = 'top_right', -- top_left,top_middle,top_right,bottom_left,bottom_middle,bottom_right,
-- middle_left,middle_middle,middle_right,none
--Arch Duoscreen
gap_x = 10, -- pixels between right or left border
gap_y = 10, -- pixels between bottom or left border
minimum_height = 300, -- minimum height of window
minimum_width = 300, -- minimum height of window
maximum_width = 300, -- maximum height of window
--Graphical
border_inner_margin = 10, -- margin between border and text
border_outer_margin = 5, -- margin between border and edge of window
border_width = 0, -- border width in pixels
default_bar_width = 80, -- default is 0 - full width
default_bar_height = 10, -- default is 6
default_gauge_height = 25, -- default is 25
default_gauge_width =40, -- default is 40
default_graph_height = 40, -- default is 25
default_graph_width = 0, -- default is 0 - full width
default_shade_color = '#000000', -- default shading colour
default_outline_color = '#000000', -- default outline colour
draw_borders = false, -- draw borders around text
draw_graph_borders = true, -- draw borders around graphs
draw_shades = false, -- draw shades
draw_outline = false, -- draw outline
stippled_borders = 0, -- dashing the border
--Textual
extra_newline = false, -- extra newline at the end - for asesome's wiboxes
format_human_readable = true, -- KiB, MiB rather then number of bytes
font = 'Roboto Mono:size=10', -- font for complete conky unless in code defined
max_text_width = 0, -- 0 will make sure line does not get broken if width too smal
max_user_text = 16384, -- max text in conky default 16384
override_utf8_locale = true, -- force UTF8 requires xft
short_units = true, -- shorten units from KiB to k
top_name_width = 21, -- width for $top name value default 15
top_name_verbose = false, -- If true, top name shows the full command line of each process - Default value is false.
uppercase = false, -- uppercase or not
use_spacer = 'none', -- adds spaces around certain objects to align - default none
use_xft = true, -- xft font - anti-aliased font
xftalpha = 1, -- alpha of the xft font - between 0-1
--Windows
own_window = true, -- create your own window to draw
own_window_argb_value = 100, -- real transparency - composite manager required 0-255
own_window_argb_visual = true, -- use ARGB - composite manager required
own_window_colour = '#000000', -- set colour if own_window_transparent no
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', -- if own_window true - just hints - own_window_type sets it
own_window_transparent = true, -- if own_window_argb_visual is true sets background opacity 0%
own_window_title = 'system_conky', -- set the name manually - default conky "hostname"
own_window_type = 'normal', -- if own_window true options are: normal/override/dock/desktop/panel
--Display
nvidia_display = ':0',
--Colours
default_color = '#D9DDE2', -- default color and border color
color1 = '#FF0000',
color2 = '#597AA1',
color3 = '#cccccc',
color4 = '#D9BC83',
color5 = '#00BFFF',
color6 = '#FFFFFF',
--Signal Colours
color7 = '#1F7411', --green
color8 = '#FFA726', --orange
color9 = '#F1544B', --firebrick
-------------------------------------
-- Icon Sources
-------------------------------------
--template0="~/.config/conky/images/weather-icons/64px-white",
template0='~/.config/conky/conky_weather/#fff__32', -- today
template1='~/.config/conky/conky_weather/#fff__32', -- +1day
template2='~/.config/conky/conky_weather/#fff__32', -- +2days
template3='~/.config/conky/conky_weather/#fff__32', -- +3days
template4='~/.config/conky/conky_weather/#fff__32', -- +4days
-------------------------------------
-- Path of conky_vision
-------------------------------------
-------------------------------------
-- API Key
-- To get API Key, first you have to sign up here https://openweathermap.org/appid
-------------------------------------
template6="d40b9df8b1b8405cd1f3bedbc3c7b45e", -- arco
-- template6="61b1657d4604c11f0a93538a002a5d53",
-------------------------------------
-- City ID
-- Find your City ID here https://openweathermap.org/city
-------------------------------------
template7="1807540",
-------------------------------------
-- Temp Unit (default, metric, imperial)
-------------------------------------
template8="metric",
-------------------------------------
-- Locale (e.g. "es_ES.UTF-8")
-- Leave empty for default
-------------------------------------
template9=""
--Lua
};
conky.text = [[\
${color6}${voffset 3}${font GE Inspira:size=34}${alignc}${time %H}:${time %M}${font}${color}
${color6}${voffset 3}${font GE Inspira:size=12}${alignc}${time %A} ${time %B} ${time %e}, ${time %Y}${font}${color}
#\
#\
#${if_existing /proc/net/route wlp0s20f3}\
#${execi 300 ~/.config/conky/conky_weather/get_internet}\
#${if_existing /home/kelen/.cache/conky-vision/internet.json}\
#${execi 300 ~/.config/conky/conky_weather/get_weather ${template6} ${template7} ${template8} ${template9}}\
#\
#${font Poiret One:size=11}${color}\
#${voffset 1}\
#${goto 10}${execi 1800 jq .main.temp ~/.cache/conky-vision/weather.json | awk '{print int($1+0.5)}' # round num}°\
#${font}${color}\
#\
#${font Poiret One:size=10}${color3}\
#${goto 80}${execi 1800 ~/.config/conky/conky_weather/parse_weather 'max' '.main.temp' '1'}°\
#${goto 140}${execi 1800 ~/.config/conky/conky_weather/parse_weather 'max' '.main.temp' '2'}°\
#${goto 200}${execi 1800 ~/.config/conky/conky_weather/parse_weather 'max' '.main.temp' '3'}°\
#${goto 260}${execi 1800 ~/.config/conky/conky_weather/parse_weather 'max' '.main.temp' '4'}°\
#${font}${color}\
#\
#${font Poiret One:size=10}${color3}\
#${voffset 35}\
#${goto 110}${execi 1800 ~/.config/conky/conky_weather/parse_weather 'min' '.main.temp' '1'}°\
#${goto 170}${execi 1800 ~/.config/conky/conky_weather/parse_weather 'min' '.main.temp' '2'}°\
#${goto 230}${execi 1800 ~/.config/conky/conky_weather/parse_weather 'min' '.main.temp' '3'}°\
#${goto 290}${execi 1800 ~/.config/conky/conky_weather/parse_weather 'min' '.main.temp' '4'}°\
#${font}${color}\
#\
#${font Poiret One:size=9}${color}\
#${voffset 10}\
#${goto 30}${execi 1800 LANG=${template9} LC_TIME=${template9} date +%a | gawk '{print toupper($0);}'}\
#${goto 90}${execi 1800 LANG=${template9} LC_TIME=${template9} date -d +1day +%a | gawk '{print toupper($0);}'}\
#${goto 150}${execi 1800 LANG=${template9} LC_TIME=${template9} date -d +2days +%a | gawk '{print toupper($0);}'}\
#${goto 210}${execi 1800 LANG=${template9} LC_TIME=${template9} date -d +3days +%a | gawk '{print toupper($0);}'}\
#${goto 270}${execi 1800 LANG=${template9} LC_TIME=${template9} date -d +4days +%a | gawk '{print toupper($0);}'}\
#${font}${color}
#\
#${execi 1800 cp -f ${template0}/$(jq .weather[0].id ~/.cache/conky-vision/weather.json).png ~/.cache/conky-vision/current.png}${image ~/.cache/conky-vision/current.png -p 10,95 -s 32x32}\
#${execi 1800 cp -f ${template1}/$(~/.config/conky/conky_weather/parse_weather 'first' '.weather[0].id' '1').png ~/.cache/conky-vision/forecast-1.png}${image ~/.cache/conky-vision/forecast-1.png -p 70,95 -s 32x32}\
#${execi 1800 cp -f ${template2}/$(~/.config/conky/conky_weather/parse_weather 'first' '.weather[0].id' '2').png ~/.cache/conky-vision/forecast-2.png}${image ~/.cache/conky-vision/forecast-2.png -p 130,95 -s 32x32}\
#${execi 1800 cp -f ${template3}/$(~/.config/conky/conky_weather/parse_weather 'first' '.weather[0].id' '3').png ~/.cache/conky-vision/forecast-3.png}${image ~/.cache/conky-vision/forecast-3.png -p 190,95 -s 32x32}\
#${execi 1800 cp -f ${template4}/$(~/.config/conky/conky_weather/parse_weather 'first' '.weather[0].id' '4').png ~/.cache/conky-vision/forecast-4.png}${image ~/.cache/conky-vision/forecast-4.png -p 250,95 -s 32x32}\
#${endif}${endif}
#\
#\
#${color5}${font Roboto:size=10}${voffset -15}S Y S T E M ${hr 2}${font}${color}${voffset 2}
${color5}${voffset 3}${font Roboto:size=10}S Y S T E M ${hr 2}${font}${color}${voffset 2}
${color2}User:${color} ${alignr}${user_names}@${nodename}
${color2}Distro:${color}${alignr} ${alignr}${execi 6000 lsb_release -a | grep 'Description'|awk {'print $2,$3 '}}
${color2}Kernel:${color}${alignr}${exec uname} ${exec uname -r}
${color2}Packages:${color}${alignr} ${execi 600 pacman -Qq | wc -l} (${execi 600 checkupdates | wc -l} update)
${color2}Uptime:${color} ${alignr}${uptime}
${color2}Battery:${color}${goto 80}${battery_time}${alignr}${battery_bar}${alignr}
${color5}${voffset 3}${font Roboto:size=10}C P U ${hr 2}${font}${color}${voffset 2}
${color2}Name:${color}${alignr}${execp env LANG=en_US.UTF-8 lscpu | sed -nr '/Model name/ s/.*:\s*(.*) CPU .*/\1/p'}
${color2}Frequency:${color} $alignr${freq_g (1)} GHz
${color2}Temperature:${color} $alignr${execi 30 sensors | grep 'Core 0' | awk {'print $3'}}
${color2}Usage:${color}${alignr}${cpu}% ${color} ${cpubar 15,100}
${cpubar cpu1 8,72} ${cpubar cpu2 8,72} ${cpubar cpu3 8,72} ${cpubar cpu4 8,72}
${cpubar cpu5 8,72} ${cpubar cpu6 8,72} ${cpubar cpu7 8,72} ${cpubar cpu8 8,72}
#
#
#${color2}${offset 30}CPU Core 1:${color} ${alignr}${offset -10}${cpu cpu1}%${alignr}${cpubar cpu1}
#${color2}${offset 30}CPU Core 2:${color} ${alignr}${offset -10}${cpu cpu2}%${alignr}${cpubar cpu2}
#${color2}${offset 30}CPU Core 3:${color} ${alignr}${offset -10}${cpu cpu3}%${alignr}${cpubar cpu3}
#${color2}${offset 30}CPU Core 4:${color} ${alignr}${offset -10}${cpu cpu4}%${alignr}${cpubar cpu4}
#${color2}${offset 30}CPU Core 5:${color} ${alignr}${offset -10}${cpu cpu5}%${alignr}${cpubar cpu5}
#${color2}${offset 30}CPU Core 6:${color} ${alignr}${offset -10}${cpu cpu6}%${alignr}${cpubar cpu6}
#${color2}${offset 30}CPU Core 7:${color} ${alignr}${offset -10}${cpu cpu7}%${alignr}${cpubar cpu7}
#${color2}${offset 30}CPU Core 8:${color} ${alignr}${offset -10}${cpu cpu8}%${alignr}${cpubar cpu8}
${color2}Processes: ${color}${alignr}$processes ($running_processes running)
${color2}Threads: ${color}${alignr}$threads ($running_threads running)
${color2} Highest${goto 200} CPU%${goto 280}PID${color}
${voffset 2}\
1 - ${top name 1}${alignr} ${goto 200}${top cpu 1} ${goto 260}${top pid 1}
2 - ${top name 2}${alignr} ${goto 200}${top cpu 2} ${goto 260}${top pid 2}
3 - ${top name 3}${alignr} ${goto 200}${top cpu 3} ${goto 260}${top pid 3}
4 - ${top name 4}${alignr} ${goto 200}${top cpu 4} ${goto 260}${top pid 4}
${color5}${voffset 3}${font Roboto:size=10}G P U ${hr 2}${font}${color}${voffset 2}
${color2}Name:${color}${alignr}${execp nvidia-smi --query-supported-clocks=gpu_name --format=csv,noheader}
${color2}Version:${color}${alignr}${execi 60000 nvidia-smi | grep "Driver Version"| awk {'print $3'}}
${color2}Temperature:${color}${alignr}${execi 10 nvidia-settings -t -q [gpu:0]/GPUCoreTemp} °C
${color2}Menory:${color}${alignr}${execi 10 nvidia-settings -q [gpu:0]/UsedDedicatedGPUMemory -t| awk '{if ($1 > 1024){printf ("%.2f G", $1 /1024)}else {printf ("%d M",$1)}}'} / ${exec nvidia-settings -q [gpu:0]/TotalDedicatedGPUMemory -t | awk '{printf ("%.2f G", $1 / 1024)}'} ${nvidiabar memutil}
${color5}${voffset 3}${font Roboto:size=10}G E N E R A L ${hr 2}${font}${color}${voffset 2}
${color2}RAM: ${color}${alignr}${offset -10}${mem} / ${memmax}${alignr}${membar}
${color2}Swap:${color} ${alignr}${offset -10}${swap} / ${swapmax}${alignr}${swapbar}
${color2} Highest${goto 200} MEM${goto 280}PID${color}
${voffset 2}\
1 - ${top_mem name 1}${alignr} ${goto 200}${top_mem mem_res 1} ${goto 260}${top_mem pid 1}
2 - ${top_mem name 2}${alignr} ${goto 200}${top_mem mem_res 2} ${goto 260}${top_mem pid 2}
3 - ${top_mem name 3}${alignr} ${goto 200}${top_mem mem_res 3} ${goto 260}${top_mem pid 3}
4 - ${top_mem name 4}${alignr} ${goto 200}${top_mem mem_res 4} ${goto 260}${top_mem pid 4}
${color5}${voffset 3}${font Roboto:size=10}D I S K S ${hr 2}${font}${color}${voffset 2}
${offset 20}${color2}Root:${color} ${alignr}${offset -10}${fs_used /} / ${fs_size /}${alignr}${fs_bar}
${offset 30}${color2}I/O Read:${color} ${alignr}${offset -10}${diskio_read /dev/nvme0n1}${alignr}${diskiograph_read /dev/nvme0n1 8,100 000000 FFFFFF}
${offset 30}${color2}I/O Write:${color} ${alignr}${offset -10}${diskio_write /dev/nvme0n1}${alignr}${diskiograph_write /dev/nvme0n1 8,100 000000 FFFFFF}
${voffset 3}\
${offset 20}${color2}Home :${color} ${alignr}${offset -10}${fs_used /home} / ${fs_size /home}${alignr}${fs_bar /home}
${offset 30}${color2}I/O Read:${color} ${alignr}${offset -10}${diskio_read /dev/sda}${alignr}${diskiograph_read /dev/sda 8,100 000000 FFFFFF}
${offset 30}${color2}I/O Write:${color} ${alignr}${offset -10}${diskio_write /dev/sda}${alignr}${diskiograph_write /dev/sda 8,100 000000 FFFFFF}
${voffset 3}\
#${offset 20}${color2}Code :${color} ${alignr}${offset -10}${fs_used /run/media/code} / ${fs_size /run/media/code}${alignr}${fs_bar /run/media/code}
#${offset 30}${color2}I/O Read:${color} ${alignr}${offset -10}${diskio_read /dev/sda5}${alignr}${diskiograph_read sda5 8,100}
#${offset 30}${color2}I/O Write:${color} ${alignr}${offset -10}${diskio_write /dev/sda5}${alignr}${diskiograph_write sda5 8,100}
#${voffset -10}
#${offset 30}${color2}Backup :${color} ${alignr}${offset -10}${fs_used /run/timeshift/backup} / ${fs_size /run/timeshift/backup}${alignr}${fs_bar /run/timeshift/backup}
#${offset 30}${color2}I/O Read:${color} ${alignr}${offset -10}${diskio_read /dev/sda4}${alignr}${diskiograph_read sda4 8,100}
#${offset 30}${color2}I/O Write:${color} ${alignr}${offset -10}${diskio_write /dev/sda4}${alignr}${diskiograph_write sda4 8,100}
#
#${offset 30}${color2}Windows :${color} ${alignr}${offset -10}${fs_used /run/media/windows} / ${fs_size /run/media/windows}${alignr}${fs_bar /run/media/windows}
#${offset 30}${color2}I/O Read:${color} ${alignr}${offset -10}${diskio_read /dev/nvme0n1p4}${alignr}${diskiograph_read nvme0n1p4 8,100}
#${offset 30}${color2}I/O Write:${color} ${alignr}${offset -10}${diskio_write /dev/nvm3on1p4}${alignr}${diskiograph_write nvme0n1p4 8,100}
#${color5}${voffset 4}${font Roboto:size=10}N E T W O R K ${hr 2}${font}${color}${voffset 2}
#${color2}${offset 30}IP Address: ${color} ${alignr}${offset -10$}${addrs wlp0s20f3}
#${color2}${offset 30}Up:${color} ${alignr}${offset -10$}${upspeed wlp0s20f3}${alignr}${upspeedgraph wlp0s20f3 8,100}
#${color2}${offset 30}Down:${color} ${alignr}${offset -10$}${downspeed wlp0s20f3}${alignr}${downspeedgraph wlp0s20f3 8,100}
#${font Roboto:size=10}N V I D I A ${hr 2}${font}
#${font Roboto:size=10,weight:bold}${color5}${execp nvidia-smi --query-supported-clocks=gpu_name --format=csv,noheader}${font}
#${font StyleBats:size=20}u${font}${offset 8}${voffset -12}GPU Temp ${alignr}${execi 60 nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader} °C
#${offset 30}Fan Speed ${alignr}${execi 60 nvidia-settings -q [fan:0]/GPUCurrentFanSpeed -t} %
#${offset 30}GPU Clock ${alignr}${execi 60 nvidia-settings -q GPUCurrentClockFreqs | grep -m 1 Attribute | awk '{print $4}' | sed -e 's/\.//' | cut -d, -f1} MHz
#${offset 30}Mem Clock ${alignr}${execi 86400 nvidia-settings -q all| grep -m 1 GPUCurrentProcessorClockFreqs | awk '{print $4}' | sed 's/.$//'} MHz
#${color5}${voffset 4}${font Roboto:size=10}P A C K A G E S ${hr 2}${font}${color}${voffset 2}
#${color2}Installed:${color}${alignr}${execi 3000 pacman -Qq | wc -l}
#${color2}Available updates:${color}${alignr}${execi 12000 pacman -Qu | wc -l}
]];
Stack trace
No response
Relevant log output
No response
If I set alignment to left, goto will work fine.Is wayland's understanding of coordinates different from x11?
I think I'm having the same issue here. After switching conky to out_to_x11 = false, out_to_wayland = true
all the text behind a ${goto}
is gone.
There seems to be some weirdness with how conky calculates coordinates on Wayland. I have a very large gap_x
of 3732px to move the window over to my second monitor. When I add that value to each ${goto}
, the text reappears and gets drawn just fine.
Here's a very small config that reproduces the issue for me:
conky.config = {
alignment = 'top_left',
use_xft = true,
font = 'Cantarell:size=12',
gap_x = 3732,
gap_y = 72,
minimum_height = 1000,
minimum_width = 330,
maximum_width = 330,
out_to_wayland = true,
out_to_x = false,
own_window = true,
own_window_argb_visual = true,
own_window_argb_value = 0,
own_window_title = '',
own_window_type = 'desktop',
update_interval = 1.0,
}
conky.text = [[
This line is left-aligned on the window border
${goto 10}This line is not visible at all
${goto 3742}This line is drawn with 10px left margin
]]