refactor(hypr): simplify wifi change script

This commit is contained in:
Price Hiller 2023-04-10 03:07:03 -05:00
parent 39b7109f39
commit fe5dde7fe5
No known key found for this signature in database

View File

@ -16,7 +16,7 @@ monitor-ssid() {
local previous_ssid=""
local ssid
while :; do
ssid="$(iwctl station wlan0 show | grep 'Connected network' | awk '{$1=$2=""; print $0}')"
ssid="$(iwctl station wlan0 show | grep 'Connected network' | awk '{print $3}')"
ssid="$(printf "%s" "${ssid}" | xargs)"
if [[ "${ssid}" != "${previous_ssid}" ]]; then
if [[ -z "${ssid// /}" ]]; then