Conky 似乎无法启动

Conky 似乎无法启动

我不确定这是否是正确的地方,因为我现在正在运行 Kubuntu,但我不知道有专门为 Kubuntu 提供帮助的论坛或堆栈。

我正在尝试运行 Conky 的 GoogleIntegratedSystem 主题,但它没有渲染实际窗口。它也没有崩溃;当我运行启动文件时,桌面瞬间闪黑,然后我得到以下输出:

conky: Syntax error (conkyKeepRc:2: unexpected symbol near '#') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: desktop window (1e0000b) is subwindow of root window (240)
conky: window type - override
conky: drawing to created window (0x7800001)
conky: drawing to double buffer
conky: forked to background, pid is 59110


conky: statfs64 '/data': No such file or directory
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  2 (X_ChangeWindowAttributes)
  Serial number of failed request:  225
  Current serial number in output stream:  226
sh: 2: --nolineart: not found
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  139 (RENDER)
  Minor opcode of failed request:  4 (RenderCreatePicture)
  Serial number of failed request:  568
  Current serial number in output stream:  572

我发现一些迹象表明这是 Conky 1.10 的问题(这很合理,因为 GISC 主题已经有五年历史了),可以通过回滚到 1.9 来修复,但我找不到仍然托管它的存储库 - 最初的存储库显然在几年前就将其删除了,并且所有的分支都会引发 404 错误。

这是 conky 配置 - 应该与我下载主题时几乎完全相同,除了底部的 gcalcli 命令使用了过时的语法。

#Conky Settings
background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048

#Window Specification
own_window no
own_window_type normal
own_window_transparent yes
own_window_argb_visual yes


border_inner_margin 0
border_outer_margin 0

# Adjust Resolution according to your screen
minimum_size 1920 1080
maximum_width 1920

alignment tr
gap_x 0
gap_y 0

#Graphics Settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

#Text settings #
use_xft yes
xftfont monofur dreams:size=8
xftalpha 0.5

uppercase no
temperature_unit celsius

default_color ffffff

#Lua Load #
lua_load ~/.config/GoogleIntegratedSystemConky/lua/scripts/haunted.lua
lua_draw_hook_pre clock_rings

## Adjust the values offset as per your requirements
TEXT
${offset 580}${voffset 0}${color dcdcdc}${font monofur:pixelsize=175}${time %H:%M}${font monofur}${offset -390}${voffset 30}${color dcdcdc}${font monofur:pixelsize=70}${time %a},${time %d} ${color dcdcdc}${font monofur:pixelsize=70}${time  %b}
#${image ~/.conky/rev-eng.png}


${offset 75}${voffset -370}${color ffffff}${font monofur:size=11:style=Bold}${exec whoami}@${nodename}
${offset 75}${color ffffff}Linux ${kernel}
${offset 75}${color ffffff}Uptime: ${uptime}

${offset 75}${voffset 100}${font monofur:size=11:style=Bold}root: ${font monofur:size=10}${fs_used /}/${fs_size /}
${offset 75}${voffset}${font monofur:size=11:style=Bold}data: ${font monofur:size=10}${fs_used /data}/${fs_size /data}
${offset 75}${voffset}${color ffffff}${font monofur:size=11:style=Bold}swap: ${font monofur:size=10}${swap}/${swapfree}

${offset 320}${voffset -61}${color ffffff}${font monofur:size=11}${color ffffff}IP Address: ${color ffffff}${addr wlp2s0}
${offset 320}${color ffffff}${font monofur:size=11}${color ffffff}Down: ${color ffffff}${downspeed wlp2s0}
${offset 320}${color ffffff}Up: ${color ffffff}${upspeed wlp2s0}

       ${offset 75}${voffset 58}${color ffffff}${font monofur:size=12}${cpu cpu_avg_samples}%${offset 10}${color dcdcdc}${hwmon 2 temp 1}°C
${offset 80}${voffset 2}${color ffffff}${font monofur:size=10}${top name 1} ${top cpu 1}
${offset 80}${voffset}${color ffffff}${font monofur:size=10}${top name 2} ${top cpu 2}
${offset 80}${voffset}${color ffffff}${font monofur:size=10}${top name 3} ${top cpu 3}
${offset 80}${voffset}${color ffffff}${font monofur:size=10}${top name 4} ${top cpu 4}
${offset 80}${voffset}${color ffffff}${font monofur:size=10}${top name 5} ${top cpu 5}
${offset 80}${voffset}${color ffffff}${font monofur:size=10}${top name 6} ${top cpu 6}
${offset 80}${voffset}${color ffffff}${font monofur:size=10}${top name 7} ${top cpu 7}
${offset 80}${voffset}${color ffffff}${font monofur:size=10}${top name 8} ${top cpu 8}
${offset 80}${voffset}${color ffffff}${font monofur:size=10}${top name 9} ${top cpu 9}
${offset 80}${voffset}${color ffffff}${font monofur:size=10}${top name 10} ${top cpu 10}

    ${offset 350}${voffset -186}${color ffffff}${font monofur:size=12}$mem/$memmax${offset 30}${color dcdcdc}
${offset 350}${voffset 2}${color ffffff}${font monofur:size=10}${top_mem name 1} ${top_mem mem_res 1}
${offset 350}${voffset}${color ffffff}${font monofur:size=10}${top_mem name 2} ${top_mem mem_res 2}
${offset 350}${voffset}${color ffffff}${font monofur:size=10}${top_mem name 3} ${top_mem mem_res 3}
${offset 350}${voffset}${color ffffff}${font monofur:size=10}${top_mem name 4} ${top_mem mem_res 4}
${offset 350}${voffset}${color ffffff}${font monofur:size=10}${top_mem name 5} ${top_mem mem_res 5}
${offset 350}${voffset}${color ffffff}${font monofur:size=10}${top_mem name 6} ${top_mem mem_res 6}
${offset 350}${voffset}${color ffffff}${font monofur:size=10}${top_mem name 7} ${top_mem mem_res 7}
${offset 350}${voffset}${color ffffff}${font monofur:size=10}${top_mem name 8} ${top_mem mem_res 8}
${offset 350}${voffset}${color ffffff}${font monofur:size=10}${top_mem name 9} ${top_mem mem_res 9}
${offset 350}${voffset}${color ffffff}${font monofur:size=10}${top_mem name 10} ${top_mem mem_res 10}

${offset 1390}${voffset -29}${font monofur bold:pixelsize=18}Mustafa Özhan ${offset -113}${voffset 18}${color #dcdcdc}${font monofur:pixelsize=16}Arch Linux

${alignc}${offset}${voffset 130}${font monofur:pixelsize=14}${color ffffff}${rss http://news.ycombinator.com/rss 12 item_title 0}
${alignc}${offset}${voffset 2}${font monofur:pixelsize=14}${color ffffff}${rss http://news.ycombinator.com/rss 12 item_title 1}${color}${font}
${alignc}${offset}${voffset 2}${font monofur:pixelsize=14}${color ffffff}${rss http://news.ycombinator.com/rss 12 item_title 2}${color}${font}
${alignc}${offset}${voffset 2}${font monofur:pixelsize=14}${color ffffff}${rss http://news.ycombinator.com/rss 12 item_title 3}${color}${font}
${alignc}${offset}${voffset 2}${font monofur:pixelsize=14}${color ffffff}${rss http://news.ycombinator.com/rss 12 item_title 4}${color}${font}
${alignc}${offset}${voffset 2}${font monofur:pixelsize=14}${color ffffff}${rss http://news.ycombinator.com/rss 12 item_title 5}${color}${font}
${alignc}${offset}${voffset 2}${font monofur:pixelsize=14}${color ffffff}${rss http://news.ycombinator.com/rss 12 item_title 6}${color}${font}
${alignc}${offset}${voffset 2}${font monofur:pixelsize=14}${color ffffff}${rss http://news.ycombinator.com/rss 12 item_title 7}${color}${font}
${alignc}${offset}${voffset 2}${font monofur:pixelsize=14}${color ffffff}${rss http://news.ycombinator.com/rss 12 item_title 8}${color}${font}
${alignc}${offset}${voffset 2}${font monofur:pixelsize=14}${color ffffff}${rss http://news.ycombinator.com/rss 12 item_title 9}${color}${font}
${alignc}${offset}${voffset 2}${font monofur:pixelsize=14}${color ffffff}${rss http://news.ycombinator.com/rss 12 item_title 10}${color}${font}

${voffset -267}${font monofur:pixelsize=14}${color ffffff}${execpi 1400 gcalcli agenda  --client-id=[redacted for obvious reasons - gcalcli throws no errors so this part should be fine] --client-secret=[*]
 --nolineart --military --refresh --nocolor "$(date)" }

答案1

根据这个来源以及您需要将参数更改--nolineart为的各种其他谷歌搜索结果--lineart=ascii

对于具有 gcalcli 4.0.0 或更新版本(不是旧的 4.0.0a4、4.0.0a3 等)的 Linux 发行版,例如 Ubuntu 19.04,请在上面的 Conky 代码中使用 --lineart=ascii 而不是 --nolineart。您可以通过在终端中运行 gcalcli --conky --nolineart calm 轻松找出您的 gcalcli 版本是否支持 --nolineart - 如果您收到错误“无法识别的参数:--nolineart”,则您正在使用不再支持 --nolineart 的较新 gcalcli 版本,您需要改用 -​​-lineart=ascii(--lineart=unicode 也可以)。

相关内容