#!/bin/sh kelvins=$(cat /sys/devices/platform/coretemp.0/hwmon/hwmon3/temp1_input) low=122 # 50C high=176 # 80C icon_low=󱃃 icon_mid=󰔏 icon_high=󱃂 fahrenheit=$(expr $(expr $(expr $(expr $kelvins \* 9) / 5) / 1000) + 32) [ $fahrenheit -lt $low ] && printf $icon_low [ $fahrenheit -ge $low ] && [ $fahrenheit -lt $high ] && printf $icon_mid [ $fahrenheit -ge $high ] && printf $icon_high printf " %s ℉\n" $fahrenheit