Grab text from anywhere on your screen with Snap Text, just like the popular MacOS feature. Select any area, and it instantly extracts detected text with OCR and copies it to your clipboard. Works with images, screenshots, dialogs, documents, apps, and other places where normal text selection is not available. Can also instantly auto-translate. It aims to be the perfect tool for capturing unselectable text from images, documents, videos, and system dialogs. Hit the Smart Extract hotkey and the extension will extract phone numbers/email/URLs/IP addresses/color codes from where your cursor is at for smart clipboard extraction - yes, even from static images.
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
EGO-A-005 manual_review
extensions should not access the clipboard directly
Direct clipboard access via `St.Clipboard.get_default()` requires reviewer scrutiny.
dependencies.js:186
St.Clipboard.get_default()
extension.js:254
St.Clipboard.get_default()
extension.js:567
St.Clipboard.get_default()
| Version | Status |
|---|---|
| 11 | Active |
| 10 | Rejected |
| 9 | Rejected |
| 8 | Active |
| 7 | Inactive |
| 6 | Rejected |
| 5 | Inactive |
| 4 | Inactive |
| 3 | Rejected |
| 2 | Rejected |
| 1 | Rejected |
Thank you for the feedback. My responses are inline. 1. You cannot use spawn command to copy (line 621 ocr.js). Response: Fixed. Switched from subprocess to native Gio.File.copy_async API for all internal file duplication - cleaner that way indeed. 2. Please don't send unnecessary code (line 239 extension.js). Apologies, I missed that, was orphaned dead code. 3. Timeout should be removed on destroy and before creating a new one (line 122 smartmenu.js): [EGO Review Guidelines: Timeout] Fixed. 4. What's the reason for === 'function' checks? Those checks were initially added as a defensive measure to maintain backward compatibility between different GNOME Shell versions (specifically handling API differences in cursor management and missing methods between GNOME 45 and 46+). I have reviewed these areas and cleaned up the conditionals to use more standard checks rather than relying on strict type checking against 'function' (which is indeed a bit nasty) 5. This code has too much spawn commands. I highly recommend to create an app and make it as a dependency for this extension. You can communicate between app and the extension with d-bus: [D-Bus Guide] Please note I have done my utmost to ensure GNOME Shell main loop is never blocked, relying on multiple spawns (Tesseract, ImageMagick, Zbar) from the extension is indeed not ideal. I am planning to migrate the heavy lifting, OCR processing, and file management into a dedicated, combined standalone app or perhaps even submission as a Mutter extension - but this would be more invasive. Can we agree that I do not extend dependencies/calls beyond what I have here? A simple extension that utilizes the dependencies in this way - also has its elegance :)
Timeout should be removed before creating a new one (line 130 `smartmenu.js`). For the spawn commands, it's still a concern since extensions are in the shell process.