6 ms·
I made a quick little zsh alias for the wifi commands: wifi () { local opt=$1 case "$opt" in (on) networksetup -setairportpower en0 on ;; (off)
by oostevo 11y ago
I made a quick little zsh alias for the wifi commands:
wifi () {
local opt=$1
case "$opt" in
(on) networksetup -setairportpower en0 on ;;
(off) networksetup -setairportpower en0 off ;;
(toggle) networksetup -setairportpower en0 off
networksetup -setairportpower en0 on ;;
(scan) /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport en0 scan ;;
("" | -h | --help) echo "Usage: wifi <option>"
echo "option:"
echo "\ton\tSet Airport adapter on"
echo "\toff\tSetAirport adapter off"
echo "\ttoggle\tTurns wifi off and then on again"
echo "\tscan\tList available wifi networks"
return 0 ;;
esac
}
Note that this is only tested on my computer, ymmv, etc.
- shanemhansen 11y agoI'm so glad I use linux so I don't have to mess around with shell scripts to get my laptop working.
- pravka 11y agoI remember using Linux on a laptop; <sarcasm>everything worked so well without any tweaking whatsoever.</sarcasm>