Repository navigation
Add QR code capture - #6679
Add QR code capture#6679
Conversation
There was a problem hiding this comment.
Pull request overview
Adds screen-region QR decoding with clipboard and notification integration.
Changes:
- Adds
omarchy capture qr. - Adds QR capture to the Capture menu.
- Installs
zbarfor new and existing systems.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
bin/omarchy-capture-qr |
Implements region decoding and result handling. |
bin/omarchy-menu |
Adds the QR capture menu option. |
install/omarchy-base.packages |
Adds zbar to fresh installations. |
migrations/1784508420.sh |
Installs zbar on existing systems. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Freeze the screen before selecting like the other region captures do, restrict decoding to QR so stray barcodes can't take the clipboard, and stop echoing the decoded value to stdout and the notification, since an otpauth:// secret would otherwise land in the journal and notification history. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Clipboard history records every selection, so the otpauth:// secret this command is built to capture would survive in it. --sensitive offers the x-kde-passwordManagerHint type that the clipboard capture skips on. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Nice feature — the Capture menu is the right home for this, and the metadata, migration, and package addition all follow the existing conventions. I've pushed two commits to the branch rather than leaving a review to round-trip on. Here's the reasoning for each. Keep the decoded value on the clipboard onlyThe motivation in the description is the strongest argument for this: an OTP setup code means the typical payload is
So the value now goes to the clipboard and nowhere else, and the copy is marked This follows Decode QR codes only
EAN/UPC in particular can false-positive on dense screen content. Freeze the screen before selectingBoth sibling region captures start Smaller things folded inThe empty-result case exited One note on — 🤖 Claude, posting on behalf of @dhh |
* Add QR code capture * Keep the decoded QR value on the clipboard only Freeze the screen before selecting like the other region captures do, restrict decoding to QR so stray barcodes can't take the clipboard, and stop echoing the decoded value to stdout and the notification, since an otpauth:// secret would otherwise land in the journal and notification history. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Mark the copied QR value as sensitive Clipboard history records every selection, so the otpauth:// secret this command is built to capture would survive in it. --sensitive offers the x-kde-passwordManagerHint type that the clipboard capture skips on. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: David Heinemeier Hansson <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This reverts commit 0db384b.
* Add QR code capture * Keep the decoded QR value on the clipboard only Freeze the screen before selecting like the other region captures do, restrict decoding to QR so stray barcodes can't take the clipboard, and stop echoing the decoded value to stdout and the notification, since an otpauth:// secret would otherwise land in the journal and notification history. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Mark the copied QR value as sensitive Clipboard history records every selection, so the otpauth:// secret this command is built to capture would survive in it. --sensitive offers the x-kde-passwordManagerHint type that the clipboard capture skips on. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: David Heinemeier Hansson <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]> # Conflicts: # install/omarchy-base.packages
This reverts commit 1777085.
Summary
omarchy capture qrto decode a selected screen regionzbarfor fresh and existing systemsMotivation
QR codes often appear on the same computer where their contents are needed—for example, when importing an OTP/2FA setup code shown by a web app. Reading one currently means reaching for a phone or taking a screenshot and manually passing it through a decoder. This feature turns that whole detour into one Capture menu action: select the QR code, then its decoded value is immediately displayed and copied to the clipboard.
Testing
bash test/omarchy-cli-test.shqrencodeand decoded it through the new command using the realzbarimg