dotfiles/sysmenu/script/ssid.sh
2022-05-22 15:32:36 -04:00

11 lines
217 B
Bash
Executable file

#!/usr/bin/bash
WLAN=$(iwctl station wlan0 show | grep Connected)
if [[ $? -eq 0 ]]; then
$WLAN | awk '{ print $3 }'
elif ip addr | grep 'enp0s31f6$' > /dev/null; then
echo "Ethernet"
else
echo "Disconnected"
fi