5 .
"$(dirname $(realpath $0))/khatus_x4_lib_common_sensor.sh"
7 count_powered_controllers
() {
8 bluetoothctl
-- show |
grep -c 'Powered: yes'
11 count_connected_devices
() {
12 bluetoothctl
-- paired-devices \
14 |
xargs -I % bluetoothctl
-- info
% \
15 |
grep -c 'Connected: yes'
19 printf "count_powered_controllers %d\n" $
(count_powered_controllers
)
20 printf "count_connected_devices %d\n" $
(count_connected_devices
)