Auto-start bluetooth service on toggle if not running

This commit is contained in:
ItsDrike 2023-01-29 22:59:53 +01:00
parent f76f7c65da
commit d4dad7beff
No known key found for this signature in database
GPG key ID: B014E761034AF742

View file

@ -11,6 +11,10 @@ toggle() {
rfkill block bluetooth
else
rfkill unblock bluetooth
if ! systemctl -q is-active bluetooth.service; then
# This will use polkit for privillege elevation
systemctl start bluetooth
fi
fi
}