Scripts/status: check if bluetooth controllers are even available
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
controller=$(bluetoothctl list)
|
||||||
devices=$(bluetoothctl devices Connected | awk '{print $2}')
|
devices=$(bluetoothctl devices Connected | awk '{print $2}')
|
||||||
|
|
||||||
if [ -z "$devices" ]
|
if [ -z "$devices" ] || [ -z "$controller" ]
|
||||||
then
|
then
|
||||||
echo ''
|
echo ''
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
data=$(sensors | awk -F'+' '/Tctl/ { gsub(/[ \t]+$/, "", $2); print $2 }')
|
echo "㊋ $(sensors | grep "Core" | sed 's/Core [0-9]:[ ]*+//;s/C.*//' | sort -r | head -1)C"
|
||||||
echo "㊋ $data"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user