fix: macos network display

This commit is contained in:
Abhishek Keshri 2024-02-21 19:37:16 +05:30
parent be82e9fada
commit e37451256c
No known key found for this signature in database

View file

@ -18,7 +18,8 @@ get_ssid() {
Darwin) Darwin)
if /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2 | sed 's/ ^*//g' &>/dev/null; then if /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2 | sed 's/ ^*//g' &>/dev/null; then
echo "$(/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2)" | sed 's/ ^*//g' SSID="$(/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2)"
printf '%s' "$SSID"
else else
echo '󰈀 Ethernet' echo '󰈀 Ethernet'
fi fi