From: Erik S. <er...@di...> - 2007-04-03 17:58:35
|
Hi there, I added a variable called $if_empty that checks if the conky variable that is passed as its argument is an empty string. It is useful to display alternative texts for variables like $mpd_* that can expand to an empty string. Example usage: ${if_empty $mpd_smart}Nothing to play.$else$mpd_smart [$mpd_elapsed/$mpd_length]$endif Due to updates in extract_variable_text_internal(), it is also possible to nest variables in the ${...} format: ${if_empty ${exec ...}} ... I hope you enjoy the patch. Erik -- Erik Scharwaechter http://diozaka.org GPG: 0x42B654AB |