#!/bin/bash
CPUTEMP=`cat /proc/acpi/thermal_zone/TZ1/temperature | awk -F " " '{print $2}'`
GFXTEMP=`cat /proc/acpi/thermal_zone/TZ2/temperature | awk -F " " '{print $2}'`
BATTEMP=`cat /proc/acpi/thermal_zone/TZ3/temperature | awk -F " " '{print $2}'`
HDDTEMP=`nc localhost 7634 | cut -f 4 -d "|"`
if [ $CPUTEMP -gt 50 ]; then
CPUCOLOR="red"
elif [ $CPUTEMP -gt 30 ]; then
CPUCOLOR="yellow"
else
CPUCOLOR="green"
fi
ICON="/usr/share/pixmaps/sensors-applet/generic-temp-icon.png"
TYPE="device"
TITLE="Temperature status"
MESSAGE=" Processor: ${CPUTEMP}°C
Graphics card: ${GFXTEMP}°C
Battery: ${BATTEMP}°C
Harddrive: ${HDDTEMP}°C"
notify-send --icon ${ICON} --type ${TYPE} "${TITLE}" "${MESSAGE}"