Code: Select all
#!/bin/bash # bluetooth_notify_on.sh export DISPLAY=:0 if rfkill list 0 | grep "Soft blocked: no"; then /usr/bin/notify-send 'Bluetooth is ON'; fi
1) Is there a more reliable way than checking 'rfkill list 0 | grep "Soft blocked: no"' to check if bluetooth is on? I assume the list index number could potentially change from 0.
2) How can I get this to work with GNOME Schedule? The script runs fine when I run it manually, but doesn't work when scheduled. I've tried everything in this thread, but nothing has worked.
Thanks in advance!
[Edit: forgot to mention, I'm running 19.1 Cinnamon]