From 9c3bc63776e82a7ddbca1166733e7fab201f77a0 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Wed, 8 Dec 2021 19:35:57 -0600 Subject: [PATCH] improved bluetooth-toggle --- bluetooth-toggle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bluetooth-toggle b/bluetooth-toggle index 6c3583f..659c19c 100644 --- a/bluetooth-toggle +++ b/bluetooth-toggle @@ -6,5 +6,8 @@ if [ $(bluetoothctl show | grep Powered | grep -c yes) -eq 1 ]; then bluetoothctl power off else + if [ $(rfkill --output-all | grep bluetooth | grep -c blocked) -ne 0 ]; then + rfkill unblock bluetooth + fi bluetoothctl power on fi \ No newline at end of file