conky execpi 指令僅讀取輸出的前 256 個位元組

conky execpi 指令僅讀取輸出的前 256 個位元組

我正在嘗試使用 .conkyForecastWU 設定 conky .conkyForecast.template。我將預​​測命令包含在我的中,如下所示.conkyrc

${execpi 1800 conkyForecastWU --template=~/.conkyForecast.template}

但是當我開始時conky,我看到每秒鐘都會出現以下錯誤:

Conky: Unable to load image '/tmp/'

上面的 -命令conkyForecastWU產生以下輸出:

${font Raleway-10:weight=thin}
${image /tmp/.conkyForecastWU-WI-Clear.gif -p 40,1000 -s 60x60}
${image /tmp/.conkyForecastWU-WI-Chance-Of-Rain.gif -p 123,1010 -s 40x40}
${image /tmp/.conkyForecastWU-WI-Partly-Cloudy.gif -p 177,1010 -s 40x40}
${image /tmp/.conkyForecastWU-WI-Partly-Cloudy.gif -p 231,1010 -s 40x40}
${image /tmp/.conkyForecastWU-WI-Chance-Of-Rain.gif -p 285,1010 -s 40x40}
${image /tmp/.conkyForecastWU-WI-Mostly-Cloudy.gif -p 339,1010 -s 40x40}
${image /tmp/.conkyForecastWU-WI-Partly-Cloudy.gif -p 393,1010 -s 40x40}

當我在第一行末尾添加空格時,錯誤訊息以 結尾'/tmp',因此 conky 只讀取輸出的這一部分,其長度恰好為 256 位元組:

${font Raleway-10:weight=thin}
${image /tmp/.conkyForecastWU-WI-Clear.gif -p 40,1000 -s 60x60}
${image /tmp/.conkyForecastWU-WI-Chance-Of-Rain.gif -p 123,1010 -s 40x40}
${image /tmp/.conkyForecastWU-WI-Partly-Cloudy.gif -p 177,1010 -s 40x40}
${image /tmp/

但有什麼問題嗎?讀取輸出時似乎是一個緩衝問題,但我如何告訴 conky 讀取超過 256 個位元組?

答案1

在這裡找到了解決方案:https://unix.stackexchange.com/questions/14785/conky-buffer-too-small

設定後

text_buffer_size 1024

問題解決了。

相關內容