Skip to content

desktop: wifi-login opens hotspot login pages, quiet while the internet works another way - #5

Merged
rhmatzeka merged 1 commit into
mainfrom
feat/wifi-login
Nov 2, 2026
Merged

rhmatzeka merged 1 commit into
mainfrom
feat/wifi-login

Conversation

@rhmatzeka

Copy link
Copy Markdown
Owner

Adds bin/wifi-login, the hotspot (captive portal) watcher, to the desktop part.

  • hypr-user.lua starts wifi-login --watch and binds Super+Shift+W to check again (which always opens the login page if there is one).
  • desktop.sh links it to ~/.local/bin/wifi-login; uninstall removes it through the manifest like every other link.
  • Probes go through the WiFi interface itself (its own DHCP DNS, curl --interface), so the result is right when tethering, LAN or Tailscale owns the default route or DNS.

Fix included: the watcher used to judge each WiFi on its own, so a campus WiFi that wanted a login kept opening its page and sending "wants a login" / "no answer" notifications while USB tethering already had internet. Now every default route is probed through its own interface once per round. While one of them is online, a WiFi that wants a login or does not answer is left alone (no page, no notification); the login page opens once that connection goes away.

Tested

  • tests/wifi-login.py (new, in CI): watcher decisions, uplink lookup, login URL parsing.
  • On the laptop with USB tethering plus two adapters on a campus portal WiFi: both WiFis are skipped, and no WiFi notification was sent in 45 s (a test notification confirmed the monitor sees them). With the tethering route hidden, the uplink lookup returns none, so the login page would open.

…the internet works another way

The watcher (started from hypr-user.lua, Super+Shift+W to check again) finds the captive portal of the WiFi you
joined and opens its login page. It used to judge each WiFi on its own, so a campus WiFi that wanted a login kept
opening its page and sending notifications even while USB tethering already had internet. Each default route is now
checked through its own interface; while one is online, a WiFi that wants a login or does not answer is left alone
with no page and no notification, and the login page opens once that connection goes away.
@rhmatzeka
rhmatzeka merged commit e396bd6 into main Nov 2, 2026
10 checks passed
@rhmatzeka
rhmatzeka deleted the feat/wifi-login branch November 2, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant