You are not logged in.
Hello. It's possible to do some flow control based on the ${acpiacadapter} state? I mean, when the laptop is plugged to the AC do this, when is not do that.
This is what I tried so far:
${if_match ${acpiacadapter} == "off-line"} foo ${else} bar ${endif}
Output error: "Conky: Bad arguments: 'on-line ' and ' "offline"' Conky: compare failed for expression 'on-line == "off-line"'
${if_match ${acpiacadapter} == off-line} foo ${else} bar ${endif}
Output error: "Conky: Bad arguments: 'on-line ' and ' offline' Conky: compare failed for expression 'on-line == off-line'
${if_empty ${acpiacadapter}} foo ${else} bar ${endif}
Turns out that the var it's never empty (as expected).
I cannot remove the battery of the laptop, it's locked under the chassis (it's a really thin laptop), so I can't check if the battery is plugged in or not. Any pointer? Thanks!
Sorry for my English. Feel free to point out my errors.
Offline
I have `${if_match "$battery_short" != "F"}$battery_short($battery_time)$endif` in my conkyrc. You need to quote the variable when using if_match.
Last edited by livibetter (2010-06-05 03:34:12)
Offline
Thank you! Worked like a charm
Sorry for my English. Feel free to point out my errors.
Offline