mod: whitespace

This commit is contained in:
2026-10-11 23:10:47 -04:00
parent 1e47ff812b
commit 91ad28b207
+3
View File
@@ -23,11 +23,13 @@ if [[ ! $route =~ [[:space:]]dev[[:space:]]([^[:space:]]+) ]]; then
jq -cn '{text: "⚠ Disconnected", class: "disconnected"}' jq -cn '{text: "⚠ Disconnected", class: "disconnected"}'
exit 0 exit 0
fi fi
interface=${BASH_REMATCH[1]} interface=${BASH_REMATCH[1]}
if [[ ! $route =~ [[:space:]]src[[:space:]]([0-9.]+) ]]; then if [[ ! $route =~ [[:space:]]src[[:space:]]([0-9.]+) ]]; then
jq -cn '{text: "⚠ Disconnected", class: "disconnected"}' jq -cn '{text: "⚠ Disconnected", class: "disconnected"}'
exit 0 exit 0
fi fi
local_ip=${BASH_REMATCH[1]} local_ip=${BASH_REMATCH[1]}
if [[ -s $state_file ]]; then if [[ -s $state_file ]]; then
@@ -48,4 +50,5 @@ if [[ $(nmcli -g GENERAL.TYPE device show "$interface" 2>/dev/null) == wifi ]];
else else
text="$local_ip" text="$local_ip"
fi fi
jq -cn --arg text "$text" '{text: $text, class: "connected"}' jq -cn --arg text "$text" '{text: $text, class: "connected"}'