Captive portal and network connectivity
Omarchy presents network access as one desktop feature. NetworkManager checks whether a link can reach the internet, the network panel shows the result, and a user action opens a safe sign-in window when a captive portal blocks access. First-run startup and shell commands provide the same state for setup, repair, and diagnosis. See also Regional configuration and connectivity and Regional package and time configuration.
Connectivity model
Network access states
The connectivity model separates a link from usable internet access. A device can be connected to Wi-Fi or Ethernet while access is portal, limited, or full; a disconnected device reports none. If checks are disabled, the panel does not trust old results and reports unknown instead.
| State | Meaning | Desktop effect |
|---|---|---|
none | No active network link | Shows the disconnected state. |
portal | The network intercepts the connectivity check and needs sign-in | Marks the connection as restricted and offers portal sign-in. |
limited | The link exists but the check does not confirm full access | Marks the connection as restricted without treating it as a portal. |
full | The connectivity check reaches the expected endpoint | Shows normal access and enables meaningful internet metrics. |
unknown | Checks are disabled or the result is not known | Avoids using stale access data. |
References: shell/…/Model.js• L45-65 shell/…/Panel.qml• L498-509
Connectivity endpoint
NetworkManager uses the plain-HTTP endpoint http://ping.omacom.io/nm-check.txt as the shared source of truth. The endpoint returns an empty 204 response with an online status header when access is complete. Plain HTTP lets a captive network intercept the request and send the browser to its sign-in page, while the fixed host avoids trusting a redirect supplied by the network.
References: etc/…/omarchy-connectivity.conf• L1-11 shell/…/Model.js• L45-47 test/…/network-captive-portal-test.sh• L37-50
Captive portal flow
Portal detection and sign-in
The network panel consumes NetworkManager's native connectivity state instead of running a second probe. When the state becomes portal, the panel marks the connection as restricted, focuses the sign-in action when open, and keeps checking while the browser handles the sign-in.
The flow connects the existing link, the panel, the browser, and the final access state:
flowchart LR
A[NetworkManager probes endpoint] --> B{Access state}
B -->|portal| C[Panel shows sign-in action]
C --> D[Open fixed HTTP URL]
D --> E[Captive network shows sign-in page]
E --> F[User completes sign-in]
F --> G[NetworkManager reports full access]
G --> H[Portal window closes]
B -->|full| I[Panel shows normal access]
The panel opens the portal only after an explicit user action. This keeps portal input out of command arguments and prevents an unexpected network redirect from being opened automatically.
References: shell/…/Panel.qml• L498-555 shell/…/Panel.qml• L1362-1381 shell/…/Model.js• L45-57
Portal window lifecycle
omarchy-network-captive-portal opens the fixed URL in a floating Chromium window. It waits for NetworkManager to report full, then closes the matching window. The wait is frequent at first and becomes slower after several minutes, so a slow sign-in remains possible without a fixed short deadline.
If the browser cannot open, the command stops waiting and restores any state that it changed. A second invocation does not create a second watcher; it only reopens the portal window while the first watcher continues.
References: bin/omarchy-network-captive-portal• L37-65 bin/omarchy-network-captive-portal• L67-105 test/…/network-captive-portal-command-test.sh• L85-125
Tailscale exit-node handling
An active Tailscale exit node can route the portal page through the same tunnel that the portal blocks. Before sign-in, the command pauses that exit node through Tailscale's local control interface. On exit it restores the node only when this command successfully paused it, and it reports a restore failure as a critical notification.
References: bin/omarchy-network-captive-portal• L10-34 bin/omarchy-network-captive-portal• L107-123 test/…/network-captive-portal-command-test.sh• L65-83
First-run Wi-Fi handling
Startup network wait
First-run startup waits for NetworkManager to finish its initial connection attempts before it decides whether the machine has network access. If no connection is available, it sends a critical Wi-Fi setup notification and waits for a link before offering update work. The startup task runs in the background so a missing network does not block the rest of first-run setup.
References: install/…/wifi.sh• L25-51
Wi-Fi setup entry point
The first-run notification opens the network shell panel rather than a separate Wi-Fi tool. This gives the user the same connection list, credential prompts, portal state, and connectivity feedback that are used after setup.
References: install/…/wifi.sh• L25-28 shell/…/Panel.qml• L211-225
Network commands
Status and repair commands
The shell commands expose network state for scripts and direct diagnosis. They use the system's active route as the main view of connectivity, so their output follows the interface that would carry internet traffic.
| Command | Purpose |
|---|---|
omarchy-network-status | Print the active link type and basic Wi-Fi details. |
omarchy-network-status --verbose | Add interface, address, gateway, transfer counters, link details, and router/internet ping samples. |
omarchy-network-wifi-connected | Return success only when the default route uses an activated Wi-Fi device. |
omarchy-restart-wifi | Unblock the radio, enable NetworkManager networking and Wi-Fi, rescan, and show the radio block state. |
omarchy-network-captive-portal <url> | Open a portal window and wait for full connectivity. The desktop passes the fixed URL. |
References: bin/omarchy-network-status• L1-5 bin/omarchy-network-status• L22-49 bin/omarchy-network-status• L85-136 bin/omarchy-network-wifi-connected• L1-29 bin/omarchy-restart-wifi• L1-11 bin/omarchy-network-captive-portal• L1-9
Wi-Fi sharing and link controls
The network feature also exposes user-facing helpers for an active Wi-Fi connection. Password and QR commands refuse enterprise Wi-Fi because it cannot be shared as one passphrase. The band command reports available bands and can pin or release a band while protecting the connection with a rollback if reassociation fails.
| Command | Purpose |
|---|---|
omarchy-network-password <interface> | Print a shareable password for the active connection. |
omarchy-network-qr [--meta] [interface] | Produce a scannable Wi-Fi QR matrix, with optional share metadata. |
omarchy-network-band [auto|2.4|5|6] | Show available band state or select automatic, 2.4 GHz, 5 GHz, or 6 GHz operation. |
omarchy-network-speedtest [down|up] | Measure live download or upload throughput on the active route. |
References: bin/omarchy-network-password• L1-34 bin/omarchy-network-qr• L20-52 bin/omarchy-network-qr• L64-97 bin/omarchy-network-band• L109-167 bin/omarchy-network-speedtest• L1-21
Desktop integration
Network panel
The network panel is the main desktop surface for access state. Its bar icon changes for normal, restricted, and disconnected states. The popup can open the portal, show active-link details, toggle the Wi-Fi radio, select DNS behavior, manage Wi-Fi connections, share the current network, and start a speed test.
The panel keeps portal checks active after it closes so the browser flow can finish. Normal connected operation uses NetworkManager's own schedule; restricted operation adds a ten-second refresh while access is blocked.
References: shell/…/Panel.qml• L501-555 shell/…/Panel.qml• L1079-1095 shell/…/Panel.qml• L1245-1289
Menu and command routing
The desktop menu exposes the network panel as the main Network setup area. It exposes the Wi-Fi QR share action only when the default route is active Wi-Fi, and it provides a separate Wi-Fi repair action for radio or NetworkManager problems. Panel actions also have IPC routes so other desktop components can open the panel, check connectivity, or invoke the portal.
References: default/…/omarchy-menu.jsonc• L189-195 default/…/omarchy-menu.jsonc• L446-448 shell/…/Panel.qml• L211-225 test/…/network-wifi-connected-test.sh• L42-60
Connectivity configuration reload
The connectivity endpoint is delivered as NetworkManager configuration. A migration reloads that configuration when NetworkManager is already running, and it stays pending if the reload fails. A stopped service reads the drop-in at its next start and needs no reload.
References: migrations/1792507034.sh• L1-15 test/…/connectivity-check-migration-test.sh• L1-7 test/…/connectivity-check-migration-test.sh• L47-58
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the NetworkManager probe URL, the panel's portal URL, and the portal window's host pattern aligned.
- Preserve the distinction between
portal,limited,full,none, andunknownso outages are not presented as sign-in pages. - If the connectivity drop-in changes, keep the reload migration and its pending-on-failure behavior correct.
- If the active-route rule changes, review status output, Wi-Fi QR visibility, and the Wi-Fi-connected predicate together.
- If portal command behavior changes, preserve exit-node restoration and the single-watcher behavior.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| The panel URL differs from the NetworkManager probe URL | A portal can intercept the probe but the sign-in action opens a different host. | Keep both values equal and test the contract. |
| Connectivity checks are disabled but stale native state is used | The panel shows an old access result. | Map disabled checks to unknown. |
| A portal sign-in runs through an active Tailscale exit node | The sign-in page can remain blocked by the tunnel. | Pause the active exit node and restore it on command exit. |
| A portal browser launch fails | The command could wait forever while access remains paused. | Detect launcher failure and restore changed state. |
| NetworkManager config reload fails during migration | The daemon can keep probing the old endpoint. | Fail the migration so it can run again. |
| A band is forced onto a network that does not offer it | Wi-Fi can lose its only usable association. | Offer only detected bands and revert on failed reconnect. |
Key files
| File | Why to read it |
|---|---|
shell/plugins/panels/network/Panel.qml | Main desktop flow for connectivity state, portal action, polling, and network controls. |
| shell/…/Model.js | Mapping between NetworkManager connectivity states and user-visible panel behavior. |
etc/NetworkManager/conf.d/omarchy-connectivity.conf | Shared connectivity probe contract and endpoint response expectation. |
bin/omarchy-network-captive-portal | Portal browser lifecycle and Tailscale exit-node coordination. |
| install/…/wifi.sh | First-run wait and Wi-Fi setup notification flow. |
default/hypr/apps/captive-portal.lua | Floating desktop treatment for the portal browser window. |
bin/omarchy-network-status | Shell-readable active-route status and network measurements. |
| default/…/omarchy-menu.jsonc | Menu entries for Network setup, Wi-Fi sharing, and Wi-Fi repair. |
| migrations/1792507034.sh | Runtime reload of the connectivity configuration. |