Skip to content

Announce connected devices that need software, with a setup guide - #19543

Open
avillagran wants to merge 6 commits into
omacom:quattrofrom
avillagran:device-guide
Open

avillagran wants to merge 6 commits into
omacom:quattrofrom
avillagran:device-guide

Conversation

@avillagran

@avillagran avillagran commented Nov 20, 2026 •

Copy link
Copy Markdown

What changes

Plugging in a printer or scanner today gives no sign that anything happened, and nothing in the launcher scans. Someone coming from macOS or Windows has to know about SANE, ipp-usb, CUPS queues and vendor drivers, or ask someone. This adds a small watcher that notices devices that still need software and a guide that gets them working, without adding a single package to the base install: Omarchy ships no drivers, only knowledge of where to get them.

  • omarchy-device-watch, started with the session from default/hypr/autostart.lua, reads udevadm monitor for USB devices and also checks what is already connected at login. A device that needs software gets a notification — when it is plugged in and at every login until it is set up, at most once a minute for a loose cable. Devices that already work (keyboards, mice, drives, webcams, phones in file-transfer mode, hubs, YubiKeys, cellular modems, USB-C Billboards) stay quiet. Idle, it is one bash process and udevadm, about 2 MB of memory and no CPU: it blocks on the read.
  • omarchy-device-detect sorts each device into a role from its sysfs interfaces: printer (and whether it prints driverless over IPP-USB), scanner, camera, iPhone/iPad, smart card reader, serial device, DisplayLink, fingerprint reader, or none bound at all. It then picks the most specific guide: the exact model, then driverless, then the vendor, then the role.
  • default/omarchy/devices.json holds the guides as data: steps, the options to install, the app that uses the device, and a link to the docs or the maker's download page.
  • omarchy-setup-device is what a notification click opens, in a floating terminal. It shows the guide, and Install and set up asks for each part of the device which option to use, every time, with Skip. For example, an Epson printer offers ESC/P-R, ESC/P-R 2, Gutenprint or Epson's download page, and its scanner half offers SANE with Document Scanner or Epson Scan 2. A driverless or HP printer can be installed with or without scanning (sane-airscan or SANE, plus Document Scanner). It then shows one summary of what will be installed and where from, and installs only after a confirmation. Installing brings in the app as well as the driver, and finishes the setup:
    • a USB printer gets its CUPS queue with the driver that names its model. It asks which driver when several installed ones do, listing the chosen option's first, and a second printer of the same model gets its own queue. Print Settings opens when the match is not certain;
    • a scanner, camera or iPhone gets its udev permissions replayed, so it works without unplugging it.
  • Setup > Devices in the menu lists the connected devices still waiting to be set up (a new leading devices provider), then Printer and Scanner, which also cover network printers, then Other.
    • Other has the guides for the remaining roles.
    • It also lists hardware Linux cannot use yet (a devices-other provider), such as Touch ID on Apple Silicon laptops, with what to do instead. That kind of hardware is never announced, since there is nothing to install.

Where drivers come from

Most guides install from the Arch repositories: gutenprint, foomatic-db, hplip, ipp-usb, sane, sane-airscan, simple-scan, gvfs-gphoto2, usbmuxd, gvfs-afc, pcsclite, ccid and fprintd.

Vendor drivers are in neither the Arch repositories nor OPR, so for those the guide offers the AUR package next to the maker's download page, and says plainly that the AUR builds from community recipes. It asks for a separate confirmation before building. Those drivers are:

  • epson-inkjet-printer-escpr and epson-inkjet-printer-escpr2 (Epson printers; both build on aarch64)
  • epsonscan2 (Epson scanners, x86_64 only)
  • brlaser (Brother lasers)
  • brscan4 and brscan5 (Brother scanners)
  • cnijfilter2 (Canon PIXMA, x86_64 only)
  • splix (Samsung lasers)
  • displaylink (DisplayLink docks)

If OPR picked these up, the guides would only need their aur lists moved to packages.

Smaller pieces

  • swapProviderRows takes a leading flag, so a provider can list its rows above a submenu's fixed children.
  • docs/menu.md documents the new providers and notes that a provider's row values must not slugify to a fixed child's id.
  • The manual's "Coming From Mac or Windows" chapter explains what happens when a device is plugged in. docs/notifications.md describes the watcher.
  • New strings: devices.* notification bodies in default/i18n/en/cli.json, and the menu labels in menu.json.

Verification

  • test/shell.d/device-guide-test.sh runs every command against a fake sysfs tree, with pacman, CUPS, gum, sudo and the notification sender stubbed. Its 32 tests cover:
    • roles, guide choice and readiness for printers, scanners, phones, cameras, smart cards, serial boards, DisplayLink and fingerprint readers;
    • devices that must stay quiet: Billboards, ADB, MTP over PTP, YubiKeys, a Mac's T2 bridge and cellular modems;
    • matching a CUPS queue and a USB URI to the whole serial, a second printer of the same model, and choosing between drivers;
    • the menu rows and the platform fingerprint and Touch ID rows;
    • when the watcher announces and when it does not: at login, on plug-in, the replug window, ready devices and Touch ID;
    • the full Install and set up flow (choices, summary, driver, app, CUPS queue, udev replay), the scanning choice for an HP on IPP-USB, and that declining installs nothing;
    • argument validation.
  • menu-test.sh covers the leading provider merge. i18n, menu, menu-guards, config, qml-text-format and ./test/cli pass, as do bin/omarchy commands --check and the syntax check over bin/.
  • In ./test/all, remote-session-service, tailscale-receive, update-stay-awake-security, theme-set-herdr-ssh-reuse and windows-vm-mount-boundary fail the same way on an unmodified quattro checkout in this environment.
  • Tested end to end on an M2 MacBook Pro (aarch64) with an Epson L380, running this branch's shell:
    • The L380 is a printer without IPP-USB plus a vendor-specific scanner interface. It was announced on plug-in and on login, was listed at the top of Setup > Devices, installed the driver and SANE with Document Scanner from the guide, got its CUPS queue, and scanned without being replugged.
    • Once it was set up, plugging it in again stayed quiet.
    • A USB mouse stayed quiet, and Touch ID showed under Other.
  • On an x86_64 desktop with only a receiver and a USB disk, nothing is reported.
  • Not checked on real hardware: IPP-USB printers, the other vendors, iPhones, smart cards, serial boards and DisplayLink docks. Those paths are covered by the fake-sysfs tests only.

Screenshots

The notification when the Epson is plugged in:

Device notification

Setup > Devices, with the connected printer above the fixed guides:

Setup > Devices

Setup > Devices > Other on an Apple Silicon laptop:

Setup > Devices > Other

A guide, opened from Setup > Devices > Printer:

Printer guide

Plugging in a printer, scanner, camera, iPhone, smart card reader, serial
board or DisplayLink dock shows a notification whenever the device still
needs software, at every plug-in and login until it is set up. Its click
opens a guide where the user always picks what to install: packages from
the repositories, the AUR where a driver is nowhere else, or the maker's
download page. Installing brings the app to use the device too and sets it
up: a printer gets its CUPS queue, a scanner its permissions.

Omarchy ships no drivers and adds no packages to the base install: the
watcher is a shell loop over udevadm monitor, and the guides are a JSON
catalog. Setup > Devices reaches the same guides, including Printer for
network printers.
@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge, with a non-blocking readiness bug for printers without serials.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with a non-blocking readiness bug for printers without serials.

Findings

  1. P2 Unconfigured printers can stay hidden ▶

Summary

Adds notices and setup guides for connected devices that need software.

  • Devices that still need software prompt the user with a setup guide.
  • Device guides show what to install and help finish the setup.
  • Setup > Devices lists connected hardware above its fixed guides.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Login or USB connection] --> B[Detect device and choose guides]
  B --> C{Needs setup?}
  C -->|Yes| D[Show notification and menu row]
  C -->|No| E[Stay quiet]
  D --> F[Open setup guide]
  F --> G[Choose software and confirm]
  G --> H[Install packages]
  H --> I[Add printer queue or refresh USB permissions]
Loading

Reviews (5) · Last reviewed commit: "Recognize FocalTech readers and configur..." · Reviewed by Greptile

Comment thread bin/omarchy-setup-device Resolved
Comment thread bin/omarchy-setup-device Resolved
Comment thread bin/omarchy-setup-device Resolved
Comment thread bin/omarchy-device-detect Resolved
Comment thread bin/omarchy-device-detect Resolved
Comment thread default/omarchy/devices.json Resolved
Comment thread bin/omarchy-setup-device Resolved
Match a printer's whole serial when picking its USB URI, give a second
printer of the same model its own CUPS queue instead of taking over the
first one's, and ask which driver to use when several installed drivers
name the model, listing the chosen option's first.

Offer scanning in the driverless and HP printer guides, open the app of
the option that was installed (Epson Scan 2), recognise the fingerprint
reader names omarchy-hw-fingerprint trusts, and number the device list so
two identical devices can each be picked.
Comment thread test/shell.d/device-guide-test.sh Resolved
@omarchybot omarchybot added the enhancement New feature or request label Nov 22, 2026
# Conflicts:
#	default/hypr/autostart.lua
#	test/shell.d/menu-test.sh
Comment thread bin/omarchy-device-detect Resolved
Comment thread bin/omarchy-device-detect Resolved
@avillagran

Copy link
Copy Markdown
Author

6201980 recognizes FocalTech fingerprint readers and treats an existing CUPS queue for the exact USB serial as evidence that the printer driver is installed. Other readiness checks still apply. The device guide and menu suites pass.

Comment thread bin/omarchy-device-detect
done <<<"$queues"
return 1
else
[[ $queues == *"usb://"* ]]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Unconfigured printers can stay hidden

For a printer without a USB serial, this branch accepts any USB printer's CUPS queue. If this printer's catalog driver is installed, guide_ready returns true even when the queue belongs to another printer. The user gets no setup notice, and the printer disappears from Setup > Devices.

When no serial is available, match the queue to this printer's vendor and model instead of accepting any usb:// queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants