aboutsummaryrefslogtreecommitdiff
path: root/scripts/.local/bin/personal/syshealth
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/.local/bin/personal/syshealth')
-rwxr-xr-xscripts/.local/bin/personal/syshealth11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/.local/bin/personal/syshealth b/scripts/.local/bin/personal/syshealth
index b60b122..48dcfa4 100755
--- a/scripts/.local/bin/personal/syshealth
+++ b/scripts/.local/bin/personal/syshealth
@@ -3,6 +3,7 @@
# NOTE: This script is run by cron periodically
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
+export DISPLAY=":0"
acpi_report="$(acpi | grep -v unavailable | head -n 1)"
sensors_report="$(sensors | grep "Package id 0:")"
@@ -12,17 +13,17 @@ local_percent="$(echo $acpi_report | awk '{print $4}')"
local_state="$(echo $acpi_report | awk '{print $3}')"
local_time="$(echo $acpi_report | awk '{print $5}')"
-battery_message=("Warning: " "Battery charge critical")
-temperature_message=("Warning: " "Core temperature critical")
+battery_message=("Warning:" "Battery VOLTAGE critical")
+temperature_message=("Warning:" "Core TEMPERATURE critical")
if ((${local_percent::-2} <= 15)); then
if [[ "${local_state::-1}" == "Discharging" ]]; then
- notify-send "${battery_message[0]}" "${battery_message[1]}" -u critical
+ /usr/local/bin/herbe " ${battery_message[0]} ${battery_message[1]}" &
# espeak "${battery_message[0]}${battery_message[1]}"
fi
elif ((${local_percent::-2} >= 90)); then
if [[ "${local_state::-1}" == "Charging" ]]; then
- notify-send "${battery_message[0]}" "${battery_message[1]}" -u critical
+ /usr/local/bin/herbe " ${battery_message[0]} ${battery_message[1]}" &
# espeak "${battery_message[0]}${battery_message[1]}"
fi
fi
@@ -32,7 +33,7 @@ local_temp="$(echo $sensors_report | awk '{print $4}' | sed 's/+//g')"
local_temp_high="$(echo $sensors_report | awk '{print $7}' | sed 's/+//g')"
if ((${local_temp::-4} >= 90)); then
- notify-send "${temperature_message[0]}" "${temperature_message[1]}" -u critical
+ /usr/local/bin/herbe " ${temperature_message[0]} ${temperature_message[1]}" &
# espeak "${temperature_message[0]}${temperature_message[1]}"
fi