Skip to content

Commit

Permalink
Patch to fix #290
Browse files Browse the repository at this point in the history
  • Loading branch information
jby committed Sep 17, 2024
1 parent 66e0910 commit 9887751
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 networksetup -getairportnetwork en0 | cut -d ':' -f 2 | sed 's/^[[:blank:]]*//g' &> /dev/null; then
if system_profiler SPAirPortDataType | awk '/Current Network Information:/ { getline; print substr($0, 13, (length($0) - 13)); exit }'; then
wifi_label=$(get_tmux_option "@dracula-network-wifi-label" "")
echo "$wifi_label$(networksetup -getairportnetwork en0 | cut -d ':' -f 2)" | sed 's/^[[:blank:]]*//g'
echo "$wifi_label$(system_profiler SPAirPortDataType | awk '/Current Network Information:/ { getline; print substr($0, 13, (length($0) - 13)); exit }')"
else
echo "$(get_tmux_option "@dracula-network-ethernet-label" "Ethernet")"
fi
Expand Down

0 comments on commit 9887751

Please sign in to comment.