Skip to content

Add 'Connecting' state to WiFi indicator in launcher #101

@nchapman

Description

@nchapman

Current Behavior

The WiFi indicator in the launcher only shows two states:

  • WiFi icon visible = connected
  • No WiFi icon = disconnected

Problem

After boot or when connecting to a network, there's a period where WiFi is enabled and trying to connect, but the launcher shows no indicator. Users can't tell if WiFi is working or if it failed.

Desired Behavior

Add a third state to match the WiFi pak's status indicator:

  • Connected - Solid WiFi icon (current behavior)
  • Connecting - Animated or different WiFi icon (flashing, different color, or "?" overlay)
  • Disconnected - No icon (current behavior)

Context

The WiFi.pak already properly detects three states:

  • Status: Connected - interface operstate is "up" with IP address
  • Status: Connecting... - interface operstate is not "down" but no IP yet (dormant/lowerlayerdown)
  • Status: Disconnected - interface operstate is "down"

The launcher should use the same detection logic.

Suggested Implementation

In the launcher WiFi indicator code:

const char* operstate = read_file("/sys/class/net/wlan0/operstate");
if (!operstate || strcmp(operstate, "down") == 0) {
    // No icon (disconnected)
} else if (strcmp(operstate, "up") == 0) {
    // Check for IP address
    if (has_ip_address()) {
        // Show connected icon
    } else {
        // Show connecting icon (no IP yet)
    }
} else {
    // operstate is dormant/lowerlayerdown/etc
    // Show connecting icon
}

This provides better UX feedback during the background connection process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions