dotfiles/dotlocal/bin/get_network

3 lines
190 B
Bash
Executable file

#!/bin/sh
if iwctl station wlan0 show | grep -q "Connected network" ; then echo $(iwctl station wlan0 show | grep "AverageRSSI" | tr -s ' ' | cut -d " " -f 3); else echo "Disconnected"; fi