diff --git a/liquidprompt b/liquidprompt index 98592d8..524c6c2 100755 --- a/liquidprompt +++ b/liquidprompt @@ -1400,7 +1400,13 @@ _lp_temp_sensors() _lp_temp_acpi() { - expr "$(acpi -t)" : '.* \([0-9]*\)\.[0-9]* degrees C' + local temperature i + temperature=0 + for i in $(acpi -t | sed 's/.* \([0-9]*\)\.[0-9]* degrees C$/\1/p') + do + (( $i > $temperature )) && temperature=$i + done + echo -ne "$temperature" } # Will set _LP_TEMP_FUNCTION so the temperature monitoring feature use an