s2 (simple screenshot / suckless screenshots) is a keyboard-first screenshot annotation and redaction tool.
makesudo pacman -S libx11 libxft freetype2 libpng pango cairo harfbuzz xclip maim slopInstall equivalents for:
- X11 development headers/libs (
libX11) - Xft + FreeType (
libXft,freetype2) - text shaping/rendering stack (
pango,cairo,harfbuzz) - PNG library (
libpng) - clipboard helper (
xclip) - optional capture workflow tools (
maim,slop)
makesudo make clean installInstall destination defaults to /usr/local/bin/s2 and can be changed in config.mk.
config.his generated fromconfig.def.hduring build.- Edit
config.hfor local customization. - Save defaults can be customized in
config.hwithdefault_save_directory. - Tool defaults can be customized in
config.hwithdefault_palette_index,default_thickness_index, anddefault_text_scale. - UI defaults can be customized in
config.hwithdefault_tool_indexandselection_bbox_color. - Before reinstalling after upstream changes, remove local
config.hso defaults can refresh:
rm -f config.h
sudo make clean installYou can also run:
make distcleanmaim -s | s2 -i -maim -s | s2 -i -Ctrl+C: copy and exitCtrl+S: save timestamped PNG and exit (prints saved absolute path)q/Esc: quit/cancel (non-zero exit)
Ctrl+C: copy rendered image to clipboard and exit successCtrl+Y: copy current image to clipboardCtrl+V: paste clipboard text only (text MIME); starts/appends text inputCtrl+S: save timestamped file to configured save directory (YYYY-MM-DDTHHMM.png)Enter: save and exitqorEsc: quit/cancel (returns non-zero)s: selection toola: arrow tooll: line toolr: rectangle toolo: circle toolt: text toolh: highlight toolm: marker tool (freehand text highlighter: drag freely like the pen to highlight text)b: blur toolp: pen tool (freehand)n: number tool (auto-incrementing markers)x: pixelate toolc: color picker tool (sample from image)h/j/k/lor arrow keys: move keyboard cursor by 1pxH/J/K/L: move keyboard cursor by 10pxSpaceor left click: apply tool action[/]: thickness, text size, or pixelate block size[/]on highlight tool changeshl-strength(1..100)[/]on marker tool changes the highlight band heightCtrl+Z: undo last actionCtrl+Shift+Z: redo1..9: select color from palette#: enter hex color mode (type 6 hex chars, Enter to apply)f: toggle fill mode (filled circles + text background with inverse contrast)X: cancel pending anchor or active pen/text input?: toggle keybindings help panelBackspace/Delete: delete selected object(s),/.: rotate selected object by 15° (counter/clockwise)</>: rotate selected object by 1° (fine)
Text mode note:
- Pressing
Escwhile typing exits text input first; pressingEscagain then quits.
Tool flow:
- Arrow/Circle/Pixelate/Blur keyboard flow: first
Spacesets anchor, secondSpacecommits. - Arrow/Circle/Pixelate/Blur mouse flow: press sets anchor, release commits at current cursor.
- Text: click or
Spaceenters text input mode; type with live preview;Enteror click commits text. - Text live-preview: while typing, current text is previewed on image before commit.
- Picker:
Spacesamples color under cursor into active color. - Selection: click object to select (shows configurable bounding box), drag moves only the bbox preview until release, then commits object move. Hold
Shiftwhile dragging to constrain movement to a single axis. - Marquee multi-selection: in select mode, drag from an empty area to draw a selection rectangle; every object whose bounding box is fully or partially inside the rectangle is selected. With multiple objects selected you can drag any of them to move the whole group, or press
Backspace/Deleteto remove them all at once. - Rotation: when a shape or text object is selected, a small round handle appears above its bounding box. Drag the handle to rotate; hold
Shiftto snap to 45° increments. Keyboard,/.and</>also rotate the selection. - Marker: a freehand text highlighter (like the pen). The cursor becomes a text I-beam while the tool is active. A vertical guide at the cursor shows the band height (adjust with
[/]). Press and drag along the text to lay down a semi-transparent stroke of that height in the selected color; the stroke follows your free movement and overlapping parts of a single stroke do not darken (single-blend highlighter look). - Pen: click-hold and drag to draw freehand using current thickness. Both pen and marker paint live into the canvas as you drag.
- Number: each click places a filled numbered circle (
1,2,3, ...) using current color; number size follows text-size.
CLI additions:
-C <class>sets X11WM_CLASS(instance/class) for window rules in WMs like dwm.-D <absdir>sets absolute save directory for Ctrl+S timestamp files (overrides config default).--normal-windowuses X11 normal window type instead of the default dialog window type.
UI behavior:
- While placing any anchored tool (arrow, line, rect, circle, highlight, pixelate, blur), a rectangle guide is shown (plus a line guide for arrow/line), during both keyboard and mouse placement.
- Status is shown in a dedicated bottom bar (not drawn on top of the image).
- Window/status colors follow a best-effort light/dark preference detection from environment/X resources.
- Window resize scales image and all objects to fit window canvas.
- Editor enforces a minimum usable window size so very small captures remain operable.
config.def.h now includes font_name for text rendering defaults.
Text fill styling in config.def.h:
text_fill_padding: background padding around filled texttext_fill_corner_radius: rounded corner radius for filled text backgroundwindow_padding: outer margin around canvas/status so bars stay visible at large sizesmax_text_scale: max text size reachable with]in text tool
Keyboard movement:
- Cursor movement now uses arrow keys only (
Left/Right/Up/Down)
