brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.17k stars 615 forks source link

catp truncates after X characters #1137

Closed sbirl closed 3 years ago

sbirl commented 3 years ago

Issue Conky v1.11.6 from Debian 11.

${catp} truncates after X characters. Unaffected by value increases to max_user_text and/or max_text_width. Problem does not exist with ${execp} or ${execpi}.

Information

I have a sort of template ~/.config/conky.conf file where it uses ${catp} to pull in a local file. This file is only partially parsed, causing conky to throw "Missing endif" errors.

conky.config = {
    max_text_width = 0,
    max_user_text = 32767,
}

conky.text = [[
${if_existing /home/sbirl/.config/conky/networks-wireless.conf}${catp /home/sbirl/.config/conky/networks-wireless.conf}${endif}
]]
  ${color 55F}wlp2s0 ${color AAF}${wireless_mode wlp2s0} ${color}${if_up wlp2s0}${addrs wlp2s0} ${alignr}${color FA0}▲${color}${upspeed wlp2s0} ${color 0F0}▼${color}${downspeed wlp2s0}
    ${color AAF}${wireless_essid wlp2s0} ${rstrip ${wireless_link_qual_perc wlp2s0}}%
    ${color AAF}${wireless_freq  wlp2s0} ${wireless_bitrate wlp2s0}${color}${else}${color F00}No wireless${color}${endif}

The data is truncated around right after the SSID is displayed.

plikhari commented 3 years ago

Increase text_buffer_size , depending on the size of your rc file - you can increase this value to 2000 or 20000 - the value is in bytes... the default value is 256 bytes

sbirl commented 3 years ago

Simply doubling it to 512 was sufficient. Thanks!