From d4dad7beffe606154ecc6039a100b5f4cfb213bd Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sun, 29 Jan 2023 22:59:53 +0100 Subject: [PATCH] Auto-start bluetooth service on toggle if not running --- home/.config/eww/scripts/bluetooth | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/home/.config/eww/scripts/bluetooth b/home/.config/eww/scripts/bluetooth index 7b80ba4..240c4ca 100755 --- a/home/.config/eww/scripts/bluetooth +++ b/home/.config/eww/scripts/bluetooth @@ -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 }