Skip to content

Commit bb3f7c9

Browse files
committed
wifi automation script + bun is now "stable" so --stable flag added
1 parent 6f68aa5 commit bb3f7c9

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

upgrade-all

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ npm i -g npm@latest
2626
# cd /Users/vladimir/.oh-my-zsh/custom/themes/spaceship-prompt
2727
# git pull --rebase
2828
# cd ~
29-
bun upgrade
29+
bun upgrade --stable
3030
sudo softwareupdate -iaR
3131
omz update
3232
omz reload

wifi-automation

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/zsh
2+
3+
# Get the network service name for the DL-dock
4+
DOCK_SERVICE="DL-Dock"
5+
# look up if dock provided ip address
6+
IP_ADDR=$(/usr/sbin/networksetup -getinfo "$DOCK_SERVICE" | grep "IP address" | awk '{print $NF}')
7+
8+
echo "ip addr found is: $IP_ADDR"
9+
10+
# Check if the network service is connected
11+
if [[ $IP_ADDR != 'none' ]]; then
12+
# If connected, disable Wi-Fi
13+
networksetup -setairportpower en0 off
14+
else
15+
# If not connected, enable Wi-Fi
16+
networksetup -setairportpower en0 on
17+
fi

0 commit comments

Comments
 (0)