Super ScreenShot is a set of libraries and tools for building screenshots in a standardized, high-performance image format made in rust.
selector_ui_preview.webm
The repo is a workspace of focused crates. Pick the layer you need β or compose them.
Capture stack (low-level, no third-party capture wrappers):
- sss_capture: Cross-platform screen / monitor / window / region capture. Pure-Rust backends written from scratch on top of canonical OS bindings β Wayland (
wlr-screencopy+ portal fallback), X11 (x11rb, nolibxcb.so), Win32 GDIBitBlt, macOS CoreGraphics. - sss_capture_ui: Interactive region / monitor / window picker (
slurp-class flow) and an annotation editor with brush, line, arrow, rectangle, ellipse, blur rectangle, eraser, numbered steps and text β every committed shape stays editable through the Pointer tool. Ships thesss-selectbinary, a drop-inslurpreplacement. - sss_ocr: OCR engine over
oar-ocrwith tiered models, hardware-aware defaults (CPU / CUDA / TensorRT / CoreML / DirectML / OpenVINO / WebGPU) and a non-blocking model-download worker.
Render stack (composes the capture stack):
- sss_lib: Base library for screenshot generation β shadows, gradient backgrounds, rounded corners, watermarks. Powers the other tools.
- sss_code: Terminal tool to render source code β PNG with syntax highlighting (themes from Sublime / VSCode).
- sss: Main terminal tool β capture full screen / region / window, annotate, watermark, save or pipe.
Important
At the moment the tool is not available in any store. Please redirect to releases section in order to download.
sss packages are built and cached automatically. To avoid unnecessary recompilations, you may use the binary cache.
nix.settings = {
builders-use-substitutes = true;
extra-substituters = [ "https://sss.cachix.org" ];
extra-trusted-public-keys = [ "sss.cachix.org-1:YI2JMG95LEu62PC7VMz75N7bypEdUz9Z/Il1hkGH4AA=" ];
};Warning
While using the sss flake, overriding the nixpkgs input for sss will cause cache hits, i.e., you will have to build from source every time. To use the cache, do not override the Nixpkgs input.
On nix you can use the provided flake:
# flake.nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
sss = {
url = "github:SergioRibera/sss";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs }: {
nixosConfigurations."<your_hostname>" = nixpkgs.lib.nixosSystem {
# ...
modules = [
# Add sss to modules to make it available
inputs.sss.nixosModules.default
{
programs.sss {
enable = true; # Enable principal cli to take screenshots
code = true; # Enable sss_code to capture code
}
}
];
# ...
};
};
}[!INFO] You can find more details about the available options at here
home-manager.users."yourusername" = ({
imports = [
inputs.sss.nixosModules.home-manager
];
programs.sss = {
enable = true;
code = {
enable = true;
line-numbers = true;
};
general = {
shadow = true;
shadow-image = true;
author = "@SergioRibera";
colors = {
background = "#FFFFFF";
author = "#000000";
};
};
};
};Note
To know how to configure it from a file, you can review the default.toml file.
All cli arguments can be set from a single file in the path ~/.config/sss/config.toml, right here you can place the configuration for sss_code and sss.
You can find examples and options in the following links.
- syntect: Rust library for syntax highlighting using Sublime Text syntax definitions.
- I use this library for code highlighting and parsing.
- djanho: Convert VSCode themes to (Neo)Vim colorschemes
- Use this project to understand how to import (Neo)vim themes.
- silicon: Create beautiful image of your source code.
- I used it as a basis for my code screenshot project.
