MCPcopy Index your code
hub / github.com/Satty-org/Satty

github.com/Satty-org/Satty @v0.21.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.21.1 ↗ · + Follow
505 symbols 901 edges 29 files 9 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Satty: Modern Screenshot Annotation.

Satty is a screenshot annotation tool inspired by Swappy and Flameshot.

Satty has been created to provide the following improvements over existing screenshot annotation tools:

  • very simple and easy to understand toolset (like Swappy)
  • fullscreen annotation mode and post shot cropping (like Flameshot)
  • extremely smooth rendering thanks to HW acceleration (OpenGL)
  • working on wlroots based compositors (Sway, Hyprland, River, ...)
  • minimal, modern looking UI, thanks to GTK and Adwaita
  • be a playground for new features (post window selection, post paint editing, ...)

Install

Thanks to our package maintainers, Satty is available for many distributions on Linux and BSD:

Packaging status

Specifics

Distribution Command Note
Gentoo emerge -av satty You need guru overlay (see wiki). Pending PR
Alpine Linux apk add satty Available in Alpine Community

Cargo

You can install satty via cargo install satty and cargo binstall satty, the latter requires cargo-binstall. In that case, no manpage, LICENSE file, .Desktop file are available. But you can use the --man and --license arguments to display either.

Prebuilt Sources

You can download a prebuilt binary for x86-64 on the Satty Releases page.

Usage

Start by providing a filename or a screenshot via stdin and annotate using the available tools. Save to clipboard or file when finished. Tools and Interface have been kept simple.

All configuration is done either at the config file in XDG_CONFIG_DIR/.config/satty/config.toml or via the command line interface. In case both are specified, the command line options always override the configuration file.

Shortcuts

  • Enter: as configured (see below), default: copy-to-clipboard (may be masked by active tool)
  • Esc: as configured (see below), default: exit (may be masked by active tool)
  • Delete reset (clear) experimental 0.20.1
  • Ctrl+C: Save to clipboard (may be masked by active tool)
  • Ctrl+Shift+D or Ctrl+Shift+I: Open GTK inspector if not already opened
  • Ctrl+S: Save to specified output file
  • Ctrl+Shift+S: Save using file dialog 0.20.0. The dialog uses output-filename as initial filename/path when available and remembers the last selected folder. 0.21.0
  • Ctrl+Alt+C: Copy last saved filepath to clipboard 0.20.1
  • Ctrl+T: Toggle toolbars
  • Ctrl+Y: Redo
  • Ctrl+Z: Undo
  • Alt+(Left/Right/Up/Down): Pan, also available with middle mouse button drag 0.20.1

Color Selection Shortcuts 0.20.1

1, 2, 3, …, 9, 0 — select nth color from the color palette

If out of range select custom color 0.21.0

Tool Selection Shortcuts (configurable) 0.20.0

Default single-key shortcuts: - p: Pointer tool - c: Crop tool - b: Brush tool - i: Line tool - z: Arrow tool - r: Rectangle tool - e: Ellipse tool - t: Text tool - m: Numbered Marker tool - u: Blur tool - g: Highlight tool

Tool Modifiers and Keys

  • Arrow: Hold Shift to make arrow snap to 15° steps
  • Ellipse: Hold Alt to center the ellipse around origin, hold Shift for a circle
  • Highlight: Hold Ctrl to switch between block and freehand mode (default configurable, see below), hold Shift for a square (if the default mode is block) or a straight line (if the default mode is freehand)
  • Line: Hold Shift to make line snap to 15° steps
  • Rectangle: Hold Alt to center the rectangle around origin, hold Shift for a square
  • Text:
  • Press Shift+Enter to insert line break.
  • Combine Ctrl with Left or Right for word jump or Ctrl with Backspace or Delete for word delete.
  • Press Enter or switch to another tool to accept input, press Escape to discard entered text.
  • Home and End go to the start/end of current line or previous/next line if already on first/last character of line (automatic wrapping is not considered for this). Ctrl with Home/End jumps to start/end of text buffer.
  • Up or Down to jump to previous/next line (if already on first/last line, it jumps to the start/end of text buffer). 0.20.1
  • Combine Shift with other keys to select text (e.g. Shift+Home to select from start of line to cursor, Shift+Left to select characters before cursor, Ctrl+Shift+Left to select words before cursor,and so on) 0.20.1
  • Double-click to select word under cursor.Triple-click to select all text. 0.20.1
  • Ctrl+A to select all text. 0.20.1
  • Ctrl+C to copy selected text to clipboard. 0.20.1
  • Ctrl+X to cut selected text to clipboard. 0.20.1
  • Ctrl+V to paste text from clipboard. 0.20.1
  • Alt+Ctrl with Left or Right or Up or Down to move the text. Use Alt+Ctrl+Shift with arrow keys to nudge the text. 0.20.1
  • Crop:
  • Press Esc or right mouse button while editing to reset crop altogether 0.21.0
  • Press Enter while editing to finish editing crop and keep the crop area active 0.21.0
  • Left click crop area when tool is active but not editing to resume editing0.21.0

Configuration File

[general]
# Start Satty in fullscreen mode
fullscreen = true
#fullscreen = false
# since 0.20.1, this can be written like below. Current is just the current screen, all is all screens. This may depend on the compositor.
#fullscreen = "all"
#fullscreen = "current-screen"
# resize initially (0.20.1)
#resize = { mode="smart" }
resize = { mode = "size", width=2000, height=800 }
# try to have the window float (0.20.1). This may depend on the compositor.
floating-hack = true
# Change to true to automatically copy to clipboard after every annotation change (0.21.0)
auto-copy = false
# Exit directly after copy/save action. 0.21.0: change to list of triggers
# Note that exit-early-save-as was removed with 0.21.0.
early-exit = ["all"]
# is equivalent to both
# early-exit = ["copy", "save", "save-as"]
# early-exit = true
# Draw corners of rectangles round if the value is greater than 0 (0 disables rounded corners)
corner-roundness = 12
# Select the tool on startup [possible values: pointer, crop, line, arrow, rectangle, text, marker, blur, brush]
initial-tool = "brush"
# Configure the command to be called on copy, for example `wl-copy`
copy-command = "wl-copy"
# Increase or decrease the size of the annotations
annotation-size-factor = 2
# Filename to use for saving action. Omit to disable saving to file. Might contain format specifiers: https://docs.rs/chrono/latest/chrono/format/strftime/index.html
# starting with 0.20.0, can contain leading tilde (~) for home directory
# starting with 0.21.0, save as uses this as initial filename/path when available
output-filename = "/tmp/test-%Y-%m-%d_%H:%M:%S.png"
# After copying the screenshot, save it to a file as well
save-after-copy = false
# Hide toolbars by default
default-hide-toolbars = false
# Experimental (since 0.20.0): whether window focus shows/hides toolbars. This does not affect initial state of toolbars, see default-hide-toolbars.
focus-toggles-toolbars = false
# Fill shapes by default (since 0.20.0)
default-fill-shapes = false
# The primary highlighter to use, the other is accessible by holding CTRL at the start of a highlight [possible values: block, freehand]
primary-highlighter = "block"
# Disable notifications
disable-notifications = false
# Actions to trigger on right click (order is important)
# [possible values: save-to-clipboard, save-to-file, save-to-file-as, copy-filepath-to-clipboard, exit]
actions-on-right-click = []
# Actions to trigger on Enter key (order is important)
# [possible values: save-to-clipboard, save-to-file, save-to-file-as, copy-filepath-to-clipboard, exit]
actions-on-enter = ["save-to-clipboard"]
# Actions to trigger on Escape key (order is important)
# [possible values: save-to-clipboard, save-to-file, save-to-file-as, copy-filepath-to-clipboard, exit]
actions-on-escape = ["exit"]
# Action to perform when the Enter key is pressed [possible values: save-to-clipboard, save-to-file]
# Deprecated: use actions-on-enter instead
action-on-enter = "save-to-clipboard"
# Right click to copy
# Deprecated: use actions-on-right-click instead
right-click-copy = false
# request no window decoration. Please note that the compositor has the final say in this. At this point. requires xdg-decoration-unstable-v1.
no-window-decoration = true
# experimental feature: adjust history size for brush input smoothing (0: disabled, default: 0, try e.g. 5 or 10)
brush-smooth-history-size = 10
# experimental feature (0.20.1): The pan step size to use when panning with arrow keys.
pan-step-size = 50.0
# experimental feature (0.20.1): The zoom factor to use for the image.
# 1.0 means no zooming.
zoom-factor = 1.1
# experimental feature (0.20.1): The length to move the text when using arrow keys. defaults to 50.0
text-move-length = 50.0 
# experimental feature (0.20.1): Scale factor on the input image when it was taken (e.g. DPI scale on the monitor it was recorded from).
# This may be more useful to set via the command line.
# Note, before 0.21.0 this is ignored with explicit resize.
input-scale = 2.0
# experimental feature (0.21.0): set window title
title = "Satty"
# experimental feature (0.21.0): set app_id, note this has to match D-Bus well-known name format, otherwise GTK does not accept it.
app-id = "org.satty.satty"


# Tool selection keyboard shortcuts (since 0.20.0)
[keybinds]
pointer = "p"
crop = "c"
brush = "b"
line = "i"
arrow = "z"
rectangle = "r"
ellipse = "e"
text = "t"
marker = "m"
blur = "u"
highlight = "g"

# Font to use for text annotations
[font]
family = "Roboto"
style = "Regular"
# specify fallback fonts (0.20.1)
# Please note, there is no default setting for these and the fonts listed below
# are not shipped with Satty but need to be available on the system.
fallback = [
    "Noto Sans CJK JP",
    "Noto Sans CJK SC",
    "Noto Sans CJK TC",
    "Noto Sans CJK KR",
    "Noto Serif CJK JP",
    "Noto Serif JP",
    "IPAGothic",
    "IPAexGothic",
    "Source Han Sans"
]

# Custom colours for the colour palette
[color-palette]
# These will be shown in the toolbar for quick selection
palette = [
    "#00ffff",
    "#a52a2a",
    "#dc143c",
    "#ff1493",
    "#ffd700",
    "#008000",
]

# These will be available in the color picker as presets
# Leave empty to use GTK's default
custom = [
    "#00ffff",
    "#a52a2a",
    "#dc143c",
    "#ff1493",
    "#ffd700",
    "#008000",
]

Command Line

``` » satty --help Modern Screenshot Annotation.

Usage: satty [OPTIONS] --filename

Options: --man Show manpage. Pipe to man -l - --license Show license -c, --config Path to the config file. Otherwise will be read from XDG_CONFIG_DIR/satty/config.toml -f, --filename Path to input image or '-' to read from stdin --fullscreen [] Start Satty in fullscreen mode. Since 0.20.1, takes optional parameter. --fullscreen without parameter is equivalent to --fullscreen current. Mileage may vary depending on compositor [possible values: all, current-screen] --resize [] Resize to coordinates or use smart mode (0.20.1). --resize without parameter is equivalent to --resize smart [possible values: smart, WxH.] --floating-hack Try to enforce floating (0.20.1). Mileage may vary depending on compositor -o, --output-filename Filename to use for saving action or '-' to print to stdout. Omit to disable saving to file. Might contain format specifiers: https://docs.rs/chrono/latest/chrono/format/strftime/index.html. Since 0.20.0, can contain tilde (~) for home dir --early-exit [...] Exit directly after save action. 0.21.0: changed to accommodate different triggers [possible values: all, copy, save, save-as] --corner-roundness Draw corners of rectangles round if the value is greater than 0 (Defaults to 12) (0 disables rounded corners) --initial-tool Select the tool on startup [aliases: --init-tool] [possible values: pointer, crop, line, arrow, rectangle, ellipse, text, marker, blur, highlight, brush] --copy-command Configure the command to be called on copy, for example wl-copy --annotation-size-factor Increase or decrease the size of the annotations --save-after-copy After copying the screenshot, save it to a file as well Preferably use the action_on_copy option instead

Extension points exported contracts — how you extend this code

Tool (Interface)
(no doc) [11 implementers]
src/tools/mod.rs
Drawable (Interface)
(no doc) [10 implementers]
src/tools/mod.rs
DrawableClone (Interface)
the clone method below has been adapted from: https://stackoverflow.com/questions/30353462/how-to-clone-a-struct-storing [1 …
src/tools/mod.rs
Highlight (Interface)
(no doc) [2 implementers]
src/tools/highlight.rs

Core symbols most depended-on inside this repo

clone
called by 80
src/ui/toolbars.rs
get
called by 30
src/tools/mod.rs
inner
called by 18
src/femtovg_area/imp.rs
request_render
called by 14
src/femtovg_area/mod.rs
is_one_of
called by 13
src/sketch_board.rs
log_result
called by 12
src/notification.rs
update_keybind
called by 11
src/configuration.rs
save
called by 11
src/configuration.rs

Shape

Method 382
Class 59
Enum 35
Function 25
Interface 4

Languages

Rust100%

Modules by API surface

src/configuration.rs72 symbols
src/sketch_board.rs62 symbols
src/tools/text.rs35 symbols
src/tools/mod.rs33 symbols
src/femtovg_area/imp.rs33 symbols
src/tools/crop.rs32 symbols
src/style.rs24 symbols
src/math.rs24 symbols
src/ui/toolbars.rs21 symbols
src/tools/highlight.rs20 symbols
src/femtovg_area/mod.rs19 symbols
src/tools/brush.rs16 symbols

For agents

$ claude mcp add Satty \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page