Upload first version.
This commit is contained in:
parent
1a0562cac7
commit
03de6daf64
1 changed files with 17 additions and 0 deletions
17
bluetoothkey
Executable file
17
bluetoothkey
Executable 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
|
Loading…
Reference in a new issue