Skip to content

Commit 9887751

Browse files
committed
Patch to fix #290
1 parent 66e0910 commit 9887751

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/network.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ get_ssid()
2222
;;
2323

2424
Darwin)
25-
if networksetup -getairportnetwork en0 | cut -d ':' -f 2 | sed 's/^[[:blank:]]*//g' &> /dev/null; then
25+
if system_profiler SPAirPortDataType | awk '/Current Network Information:/ { getline; print substr($0, 13, (length($0) - 13)); exit }'; then
2626
wifi_label=$(get_tmux_option "@dracula-network-wifi-label" "")
27-
echo "$wifi_label$(networksetup -getairportnetwork en0 | cut -d ':' -f 2)" | sed 's/^[[:blank:]]*//g'
27+
echo "$wifi_label$(system_profiler SPAirPortDataType | awk '/Current Network Information:/ { getline; print substr($0, 13, (length($0) - 13)); exit }')"
2828
else
2929
echo "$(get_tmux_option "@dracula-network-ethernet-label" "Ethernet")"
3030
fi

0 commit comments

Comments
 (0)