diff --git a/dots/bin/temperature.sh b/dots/bin/temperature.sh index d67fce9..0079da8 100755 --- a/dots/bin/temperature.sh +++ b/dots/bin/temperature.sh @@ -12,9 +12,14 @@ # the value is reported in milli-degrees celsius. we divide by 1000 to convert to degrees celsius -echo /home/poq/.config/nwg-panel/icons/temperature-full-solid-full.svg -echo "$(($(cat /sys/devices/virtual/thermal/thermal_zone3/hwmon6/temp1_input) / 1000))°C" - - +# icon: https://fontawesome.com/icons/temperature-full?f=classic&s=solid +# to set colour in svg, set `fill="white"` in the file +temperature=$(($(cat /sys/devices/virtual/thermal/thermal_zone3/hwmon6/temp1_input) / 1000)) +if [[ ${temperature} -gt 59 ]]; then + echo /home/poq/.config/nwg-panel/icons/temperature-full-solid-full.alarm.svg +else + echo /home/poq/.config/nwg-panel/icons/temperature-full-solid-full.svg +fi +echo "${temperature}°C" diff --git a/dots/nwg-panel/icons/temperature-full-solid-full.alarm.svg b/dots/nwg-panel/icons/temperature-full-solid-full.alarm.svg new file mode 100644 index 0000000..38ec84c --- /dev/null +++ b/dots/nwg-panel/icons/temperature-full-solid-full.alarm.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dots/nwg-panel/icons/temperature-full-solid-full.svg b/dots/nwg-panel/icons/temperature-full-solid-full.svg index 6f864c2..2c01227 100644 --- a/dots/nwg-panel/icons/temperature-full-solid-full.svg +++ b/dots/nwg-panel/icons/temperature-full-solid-full.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file