Getting started
Render your first code screenshot in under a minute.
Install
Same install paths as sss_cli — see install. Or from source:
cargo install --git https://github.com/SergioRibera/sss sss_codeYour first render
sss_code src/main.rs > main.pngThe default theme is base16-ocean.dark, default background #323232. Line numbers on, tab width 4.
Pipe from stdin
cat src/main.rs | sss_code --extension rs > main.pngWhen piping you must hint the language with -e <ext> because the content has no filename.
Pick a theme
sss_code --theme base16-monokai.dark src/main.rs > main.png
sss_code --list-themes # show every embedded theme
sss_code --list-file-types # show every supported languageHighlight a code block
sss_code --lines 10..40 --highlight-lines 22..25 src/main.rs > snippet.png--lines crops to that range. --highlight-lines keeps the cropped range but visually emphasises the inner range.
Where it saves
Stdout — pipe to a file or to wl-copy/xclip:
sss_code src/main.rs | wl-copy --type image/png