File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,13 @@ get_ssid()
2424      ;;
2525
2626    Darwin)
27-       if  ipconfig getsummary en0 |  awk -F '  SSID : ' ' / SSID : / {print $2}' ;  then 
28-         wifi_label=$( get_tmux_option " @dracula-network-wifi-label" " " ) 
29-         echo  " $wifi_label $( ipconfig getsummary en0 |  awk -F '  SSID : ' ' / SSID : / {print $2}' ) " 
27+       local  wifi_network=$( ipconfig getsummary en0 |  awk -F '  SSID : ' ' / SSID : / {print $2}' ) 
28+       local  airport=$( networksetup -getairportnetwork en0 |  cut -d ' :' ) 
29+ 
30+       if  [[ $airport  !=  " You are not associated with an AirPort network." ;  then 
31+         echo  " $wifi_label$airport " |  sed ' s/^[[:blank:]]*//g' 
32+       elif  [[ $wifi_network  !=  " " ;  then 
33+         echo  " $wifi_label$wifi_network " |  sed ' s/^[[:blank:]]*//g' 
3034      else 
3135        echo  " $ethernet_label " 
3236      fi 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments