Skip to content

Commit

Permalink
Changed to quicker command
Browse files Browse the repository at this point in the history
  • Loading branch information
jby committed Oct 16, 2024
1 parent 9887751 commit 784106d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ get_ssid()
;;

Darwin)
if system_profiler SPAirPortDataType | awk '/Current Network Information:/ { getline; print substr($0, 13, (length($0) - 13)); exit }'; then
if ipconfig getsummary en0 | awk -F ' SSID : ' '/ SSID : / {print $2}'; then
wifi_label=$(get_tmux_option "@dracula-network-wifi-label" "")
echo "$wifi_label$(system_profiler SPAirPortDataType | awk '/Current Network Information:/ { getline; print substr($0, 13, (length($0) - 13)); exit }')"
echo "$wifi_label$(ipconfig getsummary en0 | awk -F ' SSID : ' '/ SSID : / {print $2}')"
else
echo "$(get_tmux_option "@dracula-network-ethernet-label" "Ethernet")"
fi
Expand Down

0 comments on commit 784106d

Please sign in to comment.