2025-05-28 18:33:04 +02:00

10 lines
200 B
Bash
Executable File

#!/bin/bash
#
status=$(bluetoothctl show |awk -F"Powered:" '{print $2}' | xargs)
if [[ $status == "no" ]]; then
bluetoothctl power on
elif [[ $status == "yes" ]]; then
bluetoothctl power off
fi