Scripts/status: check if bluetooth controllers are even available

This commit is contained in:
2025-11-18 18:34:39 +00:00
parent 9bba43b567
commit 7339e74a71
2 changed files with 3 additions and 3 deletions

View File

@@ -1,8 +1,9 @@
#!/usr/bin/env sh
controller=$(bluetoothctl list)
devices=$(bluetoothctl devices Connected | awk '{print $2}')
if [ -z "$devices" ]
if [ -z "$devices" ] || [ -z "$controller" ]
then
echo ''
else

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env sh
data=$(sensors | awk -F'+' '/Tctl/ { gsub(/[ \t]+$/, "", $2); print $2 }')
echo "㊋ $data"
echo "㊋ $(sensors | grep "Core" | sed 's/Core [0-9]:[ ]*+//;s/C.*//' | sort -r | head -1)C"