Upload first version.

This commit is contained in:
Siegfried Krug 2015-02-08 22:40:57 +01:00
parent 1a0562cac7
commit 03de6daf64

17
bluetoothkey Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
#get status
status=$(rfkill list bluetooth | grep "Soft blocked")
#working part
if [[ "$status" =~ "yes" ]]
then
#if interface is disabled, activate it
rfkill unblock bluetooth
notify-send 'Bluetooth' 'The Bluetooth device is enabled' --icon=dialog-information
else
#if interface is enabled, deactivate it
rfkill block bluetooth
notify-send 'Bluetooth' 'The Bluetooth device is disabled' --icon=dialog-information
fi