refactor(hypr): simplify wifi change script
This commit is contained in:
parent
39b7109f39
commit
fe5dde7fe5
@ -16,7 +16,7 @@ monitor-ssid() {
|
|||||||
local previous_ssid=""
|
local previous_ssid=""
|
||||||
local ssid
|
local ssid
|
||||||
while :; do
|
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)"
|
ssid="$(printf "%s" "${ssid}" | xargs)"
|
||||||
if [[ "${ssid}" != "${previous_ssid}" ]]; then
|
if [[ "${ssid}" != "${previous_ssid}" ]]; then
|
||||||
if [[ -z "${ssid// /}" ]]; then
|
if [[ -z "${ssid// /}" ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user