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.
Re-order
Authored by: DaijDjan on Oct 06, '10 09:13:13AM

I dont think so.. though I am not 100% sure... more like 80% :)

the script will turn airport on / off for real
=> sets the power

dont think the system preferences do that
=> they only mark which is the PRIMARY connection
==> all others are still active though



[ Reply to This | # ]
Re-order
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 {
    new_status=$1

    if [ $new_status = "On" ]; then
	/usr/sbin/networksetup -setairportpower en1 on
        /usr/local/bin/blueutil off
	touch /var/tmp/prev_air_on
    else
	/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
	fi
    fi
}


[ Reply to This | # ]