<div><br><div class="gmail_extra"><br><div class="gmail_quote">On Sep 28, 2016 6:07 AM, "Jouke Witteveen via arch-projects" <<a href="mailto:arch-projects@archlinux.org">arch-projects@archlinux.org</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Distinguish between started profiles and online profiles in the output<br>
of the list subcommand of netctl.<br>
To be consistent in symbol usage, the wifi-menu flags have changed too.<br>
---<br>
 docs/netctl.1.txt |  4 ++--<br>
 src/<a href="http://netctl.in" rel="noreferrer" target="_blank">netctl.in</a>     | 10 ++++++----<br>
 src/wifi-menu     |  4 ++--<br>
 3 files changed, 10 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/docs/netctl.1.txt b/docs/netctl.1.txt<br>
index 0f63de4..d6d9360 100644<br>
--- a/docs/netctl.1.txt<br>
+++ b/docs/netctl.1.txt<br>
@@ -24,8 +24,8 @@ OPTIONS<br>
 The following commands are understood:<br>
<br>
 *list*::<br>
-    List all available profiles. Active profiles will be marked with a<br>
-    `*'.<br>
+    List all available profiles. Online profiles will be marked with a<br>
+    `&ast;', otherwise active profiles will be marked with a `&plus;'.<br>
<br>
 *store*::<br>
     Saves which profiles are currently active.<br>
diff --git a/src/<a href="http://netctl.in" rel="noreferrer" target="_blank">netctl.in</a> b/src/<a href="http://netctl.in" rel="noreferrer" target="_blank">netctl.in</a><br>
index fcb40f4..305c700 100644<br>
--- a/src/<a href="http://netctl.in" rel="noreferrer" target="_blank">netctl.in</a><br>
+++ b/src/<a href="http://netctl.in" rel="noreferrer" target="_blank">netctl.in</a><br>
@@ -29,11 +29,13 @@ END<br>
 }<br>
<br>
 list() {<br>
-    local indicators=( '*' ' ' )<br>
+    local indicators=( ' ' '+' '*' ) i=0<br>
     list_profiles | while read -r Profile; do<br>
-        sd_call "is-active --quiet" "$Profile" &> /dev/null<br>
-        # Make the return value boolean<br>
-        printf '%s %s\n' "${indicators[!! $?]}" "$Profile"<br>
+        if sd_call "is-active --quiet" "$Profile" &> /dev/null; then<br>
+            [[ $(sd_status_text "$Profile") == "online" ]]<br>
+            (( i = 2 - $? ))<br></blockquote></div></div></div><div><br></div><div>i needs to be reset for each loop iteration or else you'll get a stale/wrong value for an inactive profile following an active one.</div><div><br></div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+        fi<br>
+        printf '%s %s\n' "${indicators[i]}" "$Profile"<br>
     done<br>
 }<br>
<br>
diff --git a/src/wifi-menu b/src/wifi-menu<br>
index 0b18574..de2110b 100755<br>
--- a/src/wifi-menu<br>
+++ b/src/wifi-menu<br>
@@ -73,7 +73,7 @@ init_entries()<br>
             if in_array "$(ssid_to_profile "$ssid")" "${GENERATED[@]}"; then<br>
                 ENTRIES[i]="."  # Automatically generated<br>
             else<br>
-                ENTRIES[i]="+"  # Handmade<br>
+                ENTRIES[i]=":"  # Handmade<br>
             fi<br>
         else<br>
             ENTRIES[i]=" "  # Not present<br>
@@ -272,7 +272,7 @@ if (( RETURN == 0 )); then<br>
     MSG="Select the network you wish to use<br>
 Flags description:<br>
  * - active connection present<br>
- + - handmade profile present<br>
+ : - handmade profile present<br>
  . - automatically generated profile present"<br>
     CHOICE=$(dialog --column-separator : --menu "$MSG" 24 50 12 \<br>
                  "${ENTRIES[@]}" --stdout)<br>
<font color="#888888">--<br>
2.10.0<br>
</font></blockquote></div><br></div></div>