Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Re-order | 39 comments | Create New Account
Click here to return to the 'Re-order' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Authored by: jonas_jonas on Oct 08, '10 08:13:14AM

And if you have installed blueutil then you can start and stop bluetooth with it.

I use this, because I only use the bluetooth mouse and keybord when using ethernet and my external monitor. So I can automatically deactivate bluetooth on the road to save a bit of battery.

Here are the changes in the first function:

function set_airport {

    if [ $new_status = "On" ]; then
	/usr/sbin/networksetup -setairportpower en1 on
        /usr/local/bin/blueutil off
	touch /var/tmp/prev_air_on
	/usr/sbin/networksetup -setairportpower en1 off
        /usr/local/bin/blueutil on
	if [ -f "/var/tmp/prev_air_on" ]; then
	    rm /var/tmp/prev_air_on

[ Reply to This | # ]