dotfiles/scripts/iwdstat
tavo-wasd fd69ecbbe6 init
2023-05-08 20:39:39 -06:00

10 lines
331 B
Bash
Executable file

#!/bin/sh
# Depends on 'iwd'
# Get current network SSID
# Get SSID name and format properly
ssid=$(iwctl station wlan0 show | grep network | cut -d " " -f 19-23 | awk -F " " '{print $1}')
# If $ssid variable is empty, display "Disconnected"
# Display network SSID otherwise
[ -z "$ssid" ] && echo "Disconnected" || echo "$ssid"