From ff585c576d7dc683a37e97872d01e3a748fbcec0 Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Sat, 4 Feb 2023 20:13:30 +0100 Subject: [PATCH] Fix kernel panick when turning off bluetooth --- zsh/.config/zsh/functions.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zsh/.config/zsh/functions.zsh b/zsh/.config/zsh/functions.zsh index 2d02741..b34010a 100644 --- a/zsh/.config/zsh/functions.zsh +++ b/zsh/.config/zsh/functions.zsh @@ -3,12 +3,12 @@ bt() { if [[ $1 == on ]]; then (( ${+commands[connmanctl]} )) && - connmanctl enable bluetooth || - bluetoothctl power on + connmanctl enable bluetooth && sleep 0.5 + bluetoothctl power on elif [[ $1 == off ]]; then + bluetoothctl power off (( ${+commands[connmanctl]} )) && - connmanctl disable bluetooth || - bluetoothctl power off + connmanctl disable bluetooth else bluetoothctl "$@" fi