From b7ea4f208b9b73e6602ee54f0b07be6179d70f9f Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Tue, 12 Jan 2021 09:09:57 -0500 Subject: [PATCH] Add thermal sensors to status report --- home/lib/login_functions.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 9442579..8c0a351 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -539,10 +539,20 @@ status() { echo + printf '%sthermal\n' "$indent_unit" + for _dir in /sys/class/thermal/thermal_zone* + do + printf '%s %.2f C\n' \ + $(cat "$_dir"/type) \ + $(( $(cat "$_dir"/temp) / 1000 )) + done \ + | column -t \ + | indent "${indent_unit}${indent_unit}" + + echo 'net' local -r internet_addr=$(internet_addr 0.5) local -r internet_ptr=$(host -W 1 "$internet_addr" | awk 'NR == 1 {print $NF}' ) - echo 'net' echo "${indent_unit}internet" echo "${indent_unit}${indent_unit}$internet_addr $internet_ptr" echo "${indent_unit}if" -- 2.20.1