Difference between revisions of "Script for toggling bluetooth"
(First version, ideas) |
(No difference)
|
Latest revision as of 13:26, 7 May 2007
The following code snipped may be useful to enable/disable bluetooth functionality on a thinkpad.
#!/bin/bash
INFO=/proc/acpi/ibm/bluetooth
STATE=`cat $INFO | grep status| awk '{print $2}'`
case "$STATE" in
enabled)
echo -n "disable" > $INFO
;;
disabled)
echo "enable" -n > $INFO
;;
*)
echo "usage: disable, enable"
esac
Further extensions
Using Windows the Fn-F5 buttons allows to switch on/off WLAN and bluetooth also. In the future the following features will be added
- include WLAN in switching
- show status on screen