From f226f0b14e77f9e04d3874a600a61c685bc07eb1 Mon Sep 17 00:00:00 2001 From: "jacob.eva" Date: Sat, 16 Sep 2023 14:13:09 +0100 Subject: [PATCH] Fix edge case of single digit signal strength --- blocks-internet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks-internet b/blocks-internet index 72c10f3..1f7bfc1 100644 --- a/blocks-internet +++ b/blocks-internet @@ -1 +1 @@ -nmcli -t -f active,ssid dev wifi | grep -E 'yes' | cut -c 5- | grep . || (mmcli -m /org/freedesktop/ModemManager1/Modem/0 | grep "operator name:" | cut -c 38- | tr -d '\n' && echo -n ": " && mmcli -m /org/freedesktop/ModemManager1/Modem/0 | grep -P "(\d{3}|\d{2})%" -o) || echo "Disconnected" +nmcli -t -f active,ssid dev wifi | grep -E 'yes' | cut -c 5- | grep . || (mmcli -m /org/freedesktop/ModemManager1/Modem/0 | grep "operator name:" | cut -c 38- | tr -d '\n' && echo -n ": " && mmcli -m /org/freedesktop/ModemManager1/Modem/0 | grep -P "\d+%" -o) || echo "Disconnected"