![修复 Conky 小部件不加载的问题](https://linux22.com/image/179291/%E4%BF%AE%E5%A4%8D%20Conky%20%E5%B0%8F%E9%83%A8%E4%BB%B6%E4%B8%8D%E5%8A%A0%E8%BD%BD%E7%9A%84%E9%97%AE%E9%A2%98.png)
最近的系统更新破坏了 Conky 管理器,它已经 4-5 年没有在 Github 上更新了,看起来被废弃了,但也许仍然有人知道如何修复它。 Kali 和 Arch 的最新更新也发生了这种情况。
这是Conky时钟代码:
use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 1
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent no
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_colour 000000
own_window_argb_visual yes
own_window_argb_value 0
double_buffer yes
#minimum_size 250 5
#maximum_width 500
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color red
default_outline_color green
alignment top_left
gap_x 100
gap_y 30
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
use_spacer yes
minimum_size 0 0
TEXT
${voffset 10}${color EAEAEA}${font GE Inspira:pixelsize=80}${time %I:%M}${font}${voffset -72}${offset 10}${color FFA300}${font GE Inspira:pixelsize=42}${time %d} ${voffset -15}${color EAEAEA}${font GE Inspira:pixelsize=22}${time %B} ${time %Y}${font}${voffset 24}${font GE Inspira:pixelsize=46}${offset -148}${time %A}${font}
${voffset 1}${offset 12}${font Ubuntu:pixelsize=12}${offset 0}${color FFA300}RAM ${offset 9}$color$mem / $memmax${offset 25}${color FFA300}CPU ${offset 9}$color${cpu cpu0}%
运行conky -c ~/.conky/Gotham/Gotham
给出以下输出:
conky: Syntax error (Gotham:1: syntax error near 'yes') 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')
答案1
您的配置文件需要使用 Lua 语法更新到最新版本。 conky GitHub 存储库中的 wiki 提供了详细配置信息。