Kali-Linux
修復 Conky 小元件,不載入
最近的系統更新破壞了 Conky 管理器,它在 Github 上已經 4-5 年沒有更新了,看起來已經被廢棄了,但也許有人知道如何修復它。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')
您的配置文件需要使用 Lua 語法更新到最新版本。conky GitHub 儲存庫中的 wiki 提供了詳細的配置資訊。