Windows' Win+Shift+S snipping and PowerToys-style text extraction, for Cinnamon on X11.
- Super+Shift+S: the screen freezes and dims, you drag a box, and on release
the region is saved as a PNG in
~/Pictures/Screenshots/and sitting in the clipboard as an actual image. Ctrl+V into anything that takes images. - Super+Shift+T: Text Extractor, in the PowerToys style. Box the area with the text you want (this box has a black and white outline, so you can tell the two modes apart). The words inside light up where they are; click one, or drag across several, and exactly that is copied. Ctrl+V anywhere.
- Esc or right-click cancels. Nothing is saved, the clipboard is untouched.
Built and tested on a ROG Strix G712LU, Debian 13 (trixie), Cinnamon 6.4, X11.
Another small tool for my own laptop, built with a lot of help from Opus 5. Cinnamon already has an area screenshot, but it does not freeze the screen, does not dim, and saving plus copying at once took a shell one-liner. There was no text extraction at all. This is the version I actually wanted to press fifty times a day.
Everything happens on the machine: no network, no telemetry, no root (apart
from apt, if you let the installer fetch a missing package).
git clone https://github.com/TheKimi7/snip.git
cd snip
./install.shThat is the whole thing. If git says destination path 'snip' already exists,
you already have it: skip the clone and just cd snip && ./install.sh.
Keep the folder. The installed snip command is a link back into it, so
this folder is the program, including the snip/ folder inside it that looks
like a duplicate but holds the code. Delete or move it and snip stops working
until you run ./install.sh again from wherever it is now.
Run the installer as yourself, not with sudo. It goes through five steps and tells you what it did at each:
-
Checks the session. snip needs X11. On a Wayland session it stops and says how to pick the X11 one at the login screen.
-
Checks packages. Anything missing (normally only
tesseract-ocron a stock Cinnamon install) is listed, and it offers to install it:Packages to install: tesseract-ocr (tesseract-ocr is only for Super+Shift+T, copying text off the screen) Install them now? This runs sudo apt-get and asks for your password. [Y/n]Say no and it carries on; screenshots work without Tesseract. For an unattended install,
./install.sh --with-depssays yes for you. -
Installs the files, all in your home:
~/.local/bin/snip(a symlink to this folder, so there is no copy to go stale), a D-Bus activation file and an autostart entry. -
Binds the shortcuts in Cinnamon. See below for what happens if something already uses them. On another desktop it prints the two commands for you to bind yourself.
-
Starts the service and runs
snip status:snip 1.2.0 ok session X11, X-Cinnamon ok service running, pid 12731, 47 MB ok shortcut Super+Shift+S Snip: screenshot ok shortcut Super+Shift+T Snip: copy text from screen ok OCR tesseract 5.5.0, languages eng -- screenshots ~/Pictures/Screenshots
Running ./install.sh again is always safe. It changes nothing that is already
right, keeps any shortcut you changed, and restarts the service onto the
current code.
On the first install, if something already sits on either key, the installer moves it out of the way instead of silently fighting it, and prints what it did:
- a Cinnamon built-in goes back to its default key. On my machine that was Cinnamon's own area screenshot, which had been put on Super+Shift+S and now lives on Shift+Print again;
- another custom shortcut keeps its name and command and only loses the key;
- applet shortcuts are reported, never edited.
The originals are written to ~/.config/snip/keybindings.json, and
./install.sh --uninstall puts every one of them back.
They are ordinary Cinnamon custom shortcuts: System Settings > Keyboard > Shortcuts > Custom Shortcuts, "Snip: screenshot" and "Snip: copy text from screen". Change or remove the keys there. Re-running the installer respects that and will not put the old keys back.
Every installed Tesseract language is used, English first, so adding one is
just sudo apt install tesseract-ocr-hin (or -deu, -fra, ...), with no
restart. To pin a set instead, write it to ~/.config/snip/ocr-languages, e.g.
eng+hin.
The box you drag first is only where to look. It stays on the frozen screen while Tesseract reads it (a busy cursor for about 0.15 s), then every word it found stays bright and the rest of the box dims. From there:
| Do this | Copies |
|---|---|
| click a word | that word, e.g. just DOWNLOAD out of a column of buttons |
| drag from one word to another | everything between them in reading order, with line breaks |
| Ctrl+A, then Enter (or Ctrl+C) | all the text in the box |
| click between words | nothing; keep choosing |
| press outside the box | nothing yet: it starts a new box |
| Esc or right-click | nothing, and the clipboard is left alone |
Hovering highlights the word under the pointer in your theme's selection colour, and a selection is drawn the way selected text is, one band per line.
git pull
snip restartThe installed command is a symlink into this folder, so the pull is the update;
the restart puts the running service on the new code. ./install.sh works too.
Start with snip status. ok is fine, -- is information, and !! is
something broken, which also makes it exit 1:
snip status says |
Do this |
|---|---|
!! service not installed |
run ./install.sh |
-- service not running; starts on the next keypress |
nothing; the first press takes about a third of a second longer |
!! shortcut ... but also ... |
two things share the key: change one in Keyboard settings |
!! shortcut ... no key |
you removed it: set one in Keyboard settings |
-- OCR not installed |
sudo apt install tesseract-ocr |
!! session Wayland |
log in to the X11 session |
| "This copy of snip ... is incomplete", or "the program files ... are missing" | something inside the folder was deleted: run git restore . in it |
If a key does nothing, run snip screenshot in a terminal: any D-Bus error is
printed there. To watch the service itself, snip quit, then
SNIP_DEBUG=1 snip daemon runs it in the foreground with timings; Ctrl+C and
snip restart when done.
Super+Shift+S (a Cinnamon custom shortcut)
|
| runs "snip screenshot", which is one gdbus call
v
snip service (io.github.TheKimi7.Snip on the session bus; the bus starts it
| if it is not running)
| grabs the whole X screen once: this is the frozen frame
v
overlay: the frame, dimmed; drag a box (Esc or right-click cancels)
|
| the crop is cut from the frozen frame, never the live screen
v
screenshot: image to the clipboard, PNG to ~/Pictures/Screenshots, notification
text: the box stays up; tesseract (local) finds each word and where it
is; you pick words on the frozen screen; those go to the clipboard
The service stays running, which is what makes the overlay quick (the frame grab takes 12 to 20 ms and the overlay is up 20 to 70 ms after the keypress reaches it), and it is also how X11 clipboards work: copied data is served by a live process. It is offered to Cinnamon's clipboard manager as well, so it survives the service being stopped.
The first grab of keyboard and mouse usually fails because Muffin still holds
the shortcut keys; the overlay retries for up to a second instead of giving up.
The PNG is written through a hidden temp file and renamed, so a half-written
file never shows up. OCR settings came from benchmarking against text rendered
in this desktop's own fonts; the reasoning is at the top of snip/ocr.py. For the
Text Extractor it asks for TSV output, which gives every word with its box and
its block, paragraph and line in reading order. The boxes are mapped back from
the upscaled image to the screen, so each word lights up exactly over itself,
and a drag selects by reading order rather than by position, so columns and
wrapped lines behave. One-character "words" read with low confidence (icons,
arrows, bullets) are dropped. Text notifications are transient, so copied text does not pile
up in the notification tray.
snip screenshot select a region, save it and copy the image
snip ocr select a region and copy its text
snip status check that everything is in place
snip restart restart the service
snip quit stop the service
snip daemon run the service in the foreground (SNIP_DEBUG=1 for timings)
Tests: python3 -m unittest discover -s tests. The shortcut tests run against
an in-memory settings backend and refuse to run against real desktop settings.
- X11 only. This relies on reading the root window and on override-redirect windows, both of which Wayland deliberately forbids. A Wayland port would go through the screenshot portal and lose the frozen-frame overlay. Cinnamon's default session is X11.
- OCR is Tesseract, so it is good on UI and terminal text and weaker on
things the language model does not know: with only English installed,
₹reads as*andßasB. Photos, stylised or rotated text, and handwriting are out of scope. - Text is picked by whole words, not by characters.
- The freeze is a snapshot at the moment you press the key, like Windows. Video does not keep playing under the overlay.
- Notifications follow Cinnamon's own rules: with "show notifications over fullscreen windows" off (the default), a snip taken over a fullscreen app still saves and copies, but its bubble is not shown.
- Tested on one 1080p monitor at scale 1. Multiple monitors and HiDPI are handled in the code (one overlay spans the whole X screen; selections are scaled by the window scale factor) but have not been run on real hardware.
./install.sh --uninstallRemoves the shortcuts (restoring whatever they replaced), the service, the activation and autostart files. Your screenshots stay where they are.