mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-27 05:28:37 -06:00
improved bluetooth-toggle
This commit is contained in:
parent
23517fffbf
commit
9c3bc63776
1 changed files with 3 additions and 0 deletions
|
@ -6,5 +6,8 @@
|
||||||
if [ $(bluetoothctl show | grep Powered | grep -c yes) -eq 1 ]; then
|
if [ $(bluetoothctl show | grep Powered | grep -c yes) -eq 1 ]; then
|
||||||
bluetoothctl power off
|
bluetoothctl power off
|
||||||
else
|
else
|
||||||
|
if [ $(rfkill --output-all | grep bluetooth | grep -c blocked) -ne 0 ]; then
|
||||||
|
rfkill unblock bluetooth
|
||||||
|
fi
|
||||||
bluetoothctl power on
|
bluetoothctl power on
|
||||||
fi
|
fi
|
Loading…
Reference in a new issue