Conky cpubar以错误的方式填充

问题描述 投票:1回答:1

我有一个简单的conky cpubar用于监视在Debian KDE 9上运行的CPU负载,这里是相关部分:

${image ~/script/conky/static/img/cpu.png -p 0,280 -s 26x26}\
${goto 40}${font monospace:bold:size=15}${color1}CPU ${font   monospace:bold:size=10}(TOT: ${cpu cpu0}%) ${color0}${hr 5}${color white}

${font monospace:bold:size=11}\
${execi 99999 neofetch | grep 'CPU' | cut -f 2 -d ":" | sed 's/^[ \t]*//;s/[ \t]*$//' | sed 's/[\x01-\x1F\x7F]//g' | sed 's/\[0m//g' | sed 's/\[.*\]//'}\
[${execi 5 sensors | grep 'temp1' | cut -c16-22}]
${cpugraph cpu0 40,340 52ff00 6edd21}
CPU 1${goto 70}${cpu cpu1}%${goto 100}${cpubar 8,width_cpu_bar cpu1}
CPU 2${goto 70}${cpu cpu2}%${goto 100}${cpubar 8,width_cpu_bar cpu2}
CPU 3${goto 70}${cpu cpu3}%${goto 100}${cpubar 8,width_cpu_bar cpu3}
CPU 4${goto 70}${cpu cpu4}%${goto 100}${cpubar 8,width_cpu_bar cpu4}

这是结果:

enter image description here

另一个例子:

enter image description here

正如你所看到的结果看起来不错,但填充cpubars不能正常工作,并且所有4个条都有相同的填充,在最后一个我清楚地看到我有100%核心负载(CPU3)并且他的条没有完全填满。我哪里错了?

lua kde conky
1个回答
0
投票

cpu编号位于高度,宽度部分之前,即使用

${cpubar cpu1 8,width_cpu_bar}
© www.soinside.com 2019 - 2024. All rights reserved.