从我的日志中:
conky:错误参数:“ 0,0”和“ 10.0”
conky:比较表达式“ 0,0 <10.0”失败
这些比较都与此类似:
$ {if_match $ {downspeedf enp2s0} <100.0}
如果参数用“,”编写,则比较仍然失败。 明确将conky的语言环境设置为en_US.UTF-8现在可以使用。
(这在1.9.0中没有发生。)
我也有同样的问题。
同样在这里,您能告诉我如何为conky设置特定的LOCALE吗?
您以例如命令开头。
LC_ALL = C conky
谢谢,但是事实证明,与分数的比较通常是失败的:
conky:比较表达式'12,61> = 10'失败
${if_match ${top cpu 1} >= 10 }${color red}\
${else}${color}\
${endif}\
抱歉,我的错,现在没有设置区域设置。 我现在使用以下启动脚本:
#!/bin/bash
export LANG=en_US.UTF-8
export LC_ALL=C
sleep 5 && conky
旁注:看起来像在algebra.cc中:枚举arg_type get_arg_type。 我建议使用可识别语言环境的数字解析器。
在当前版本的Conky中,此问题仍然存在吗? 如果是这样,请更新问题。 否则,此问题将在2周内结束。
@lasers可以看看吗?
@ su8我尝试过。 不熟悉语言环境。 尝试过意大利。 没有显示逗号。 也许我做错了。
@ su8我在这里尝试了git bisect到1.9.0
。 较早的标签不包含cmake
东西。 :-(
我们。
0B // False
56.9K // True
16.9K // False
544B // False
74.9K // True
88.4K // True
13.9K // False
DK。
conky: Bad arguments: '0,0' and '50.0'
conky: compare failed for expression '0,0>50.0'
0B // True
conky: Bad arguments: '0,0' and '50.0'
conky: compare failed for expression '0,3>50.0'
307B // True
^Cconky: Bad arguments: '0,3' and '50.0'
conky: compare failed for expression '0,3>50.0'
350B // True
@ su8以防万一您错过了最新评论,我现在可以测试一下。
当使用使用','的语言环境时,将跳过此行
并返回
这导致“错误的论点”被打印出来
你可以测试一下吗:
diff --git a/src/algebra.cc b/src/algebra.cc
index 66dfd2d6..4e1d36e2 100644
--- a/src/algebra.cc
+++ b/src/algebra.cc
@@ -155,7 +155,7 @@ enum arg_type get_arg_type(const char *arg) {
if (p == e + 1) {
return ARG_LONG;
}
- if (*p == '.') {
+ if (*p == '.' || *p == ',') {
p++;
while (p <= e) {
if (isdigit((unsigned char)*p) == 0) {
有用。 数字也以逗号打印。 懒惰复制了上面的示例。
56,9K // True
16,9K // False
544B // False
74,9K // True
88,4K // True
13,9K // False
这也发生在主人身上。 嗯实际上,我认为这是可以的。 h 。
因为我很懒,所以打开了一个拉动请求:hamburger:
你不懒我是激光懒惰者。 我在想什么。 如果其中包含逗号,是否应该不先交换字符?
这有意义还是我想得太多?
这是当前的国家/地区标准,为什么将其更改为其他标准?
Idk。 菜鸟在这里。 我将根据您的要求提出拉取请求。 if (*p == '.') {
用途是什么?