I'm using wpa_supplicant
to connect to my wifi network. Since I'm using dwm
, I want to show the SSID of the connected network in the panel. Is there a way to get the SSID of the connected network in wpa_supplicant
?
2 Answers
You can do this using iwgetid
from the wireless_tools
package:
pacman -S wireless_tools
Then run
iwgetid -r
You can get the current SSID with wpa_cli
which is part of the wpa_supplicant
package. No need to install wireless_tools
...
wpa_cli status
will spew out info of the current network. Just look for the ssid
value in the output.
-
Failed to connect to non-global ctrl_ifname: (nil) error: No such file or directory
. The accepted answer worked though. Sep 26, 2020 at 17:36
nmcli
orwicd-cli
, notwpa_cli
...