diff --git a/zsh/.config/zsh/functions.zsh b/zsh/.config/zsh/functions.zsh index 37abaf3..c5f7166 100644 --- a/zsh/.config/zsh/functions.zsh +++ b/zsh/.config/zsh/functions.zsh @@ -1,3 +1,15 @@ +bt() { + (( ${+commands[bluetoothctl]} )) || return 1 + + if [[ $1 == on ]]; then + connmanctl enable bluetooth + elif [[ $1 == off ]]; then + connmanctl disable bluetooth + else + bluetoothctl "$@" + fi +} + doasedit() { (( ${+commands[doas]} )) || return 1