Satty Documentation

repository·main·Indexed 24 days ago

https://github.com/satty-org/satty

Satty is a modern screenshot annotation tool for Linux and BSD featuring hardware-accelerated OpenGL rendering and a minimal GTK/Adwaita UI. It supports wlroots-based compositors like Sway and Hyprland, allowing users to pipe screenshots via stdin for annotation. The tool includes a comprehensive CLI for configuring window behavior, annotation styles, and interaction triggers, as well as a TOML configuration file for persistent settings.

Tokens
14.4K
Snippets
16
Records
56
Agent score
80%

What's inside Satty

  1. Build Satty from source

    main

    To build Satty from source, you must first install the required native dependencies (glib2, gtk4, gdk-pixbuf2, libadwaita, libepoxy, and fontconfig). Once dependencies are installed, use make to build the release binary or install it to your system.

    Note: The build release binary will be located in ./target/release/satty.

    # build release binary, located in ./target/release/satty
    make build-release
    
    # optional: install to /usr/local
    PREFIX=/usr/local make install
    
    # optional: uninstall from /usr/local
    PREFIX=/usr/local make uninstall
  2. Tool-specific modifiers and keys

    main

    Crop Tool

    • Esc or Right Click: Reset crop area.
    • Enter: Finish editing crop and keep the area active.
    • Left Click: Resume editing an existing crop area.

    Arrow and Line Tools

    • Shift: Snap to 15° steps.

    Rectangle, Ellipse, Blur, and Highlight

    • Alt: Center the tool around the origin.
    • Shift: Make dimensions uniform (square or circle).
    • Alt + Shift: Combine centering and uniform dimensions.

    Text Tool

    • Shift+Enter: Insert line break.
    • Ctrl + Left/Right: Word jump.
    • Ctrl + Backspace/Delete: Word delete.
    • Enter or switch tool: Accept input.
    • Escape: Discard text.
    • Home/End: Jump to start/end of line.
    • Ctrl + Home/End: Jump to start/end of text buffer.
    • Up/Down: Jump to previous/next line.
    • Ctrl+A: Select all.
    • Ctrl+C/X/V: Copy/Cut/Paste.
    • Alt+Ctrl + Arrows: Move text.
    • Alt+Ctrl+Shift + Arrows: Nudge text.
    • Alt: Cycle text effects (none → inverted outline → contrast outline → drop shadow).

    Highlight Tool

    • Ctrl: Switch between block and freehand mode.
  3. Install Satty via Flatpak

    main

    Satty is available as a Flatpak bundle. You can download pre-built bundles from the GitHub Releases page and install them using the flatpak install command.

    # Download the .flatpak file from the latest release
    # Then install it:
    flatpak install satty-<version>.flatpak
  4. Satty keyboard shortcuts

    main

    General Shortcuts

    • Enter: As configured (default: copy-to-clipboard)
    • Esc: As configured (default: exit)
    • Delete: Reset (clear) [experimental]
    • Ctrl+C: Save to clipboard
    • Ctrl+S: Save to specified output file
    • Ctrl+Shift+S: Save using file dialog
    • Ctrl+T: Toggle toolbars
    • Ctrl+Y: Redo
    • Ctrl+Z: Undo
    • Alt + Arrow Keys: Pan (also available with middle mouse button drag)

    Mouse Controls

    • Ctrl + Wheel: Zoom in/out
    • Middle Click: Pan

    Color Selection

    • 1 through 9, 0: Select the nth color from the palette. If out of range, selects custom color.

    Tool Selection (Default)

    • p: Pointer
    • c: Crop
    • b: Brush
    • i: Line
    • z: Arrow
    • r: Rectangle
    • e: Ellipse
    • t: Text
    • m: Numbered Marker
    • u: Blur
    • g: Highlight
  5. Install Satty on Linux and BSD

    main

    Satty is available through various package managers depending on your distribution.

    Gentoo

    Use emerge -av satty. Note that you need the guru overlay.

    Alpine Linux

    Use apk add satty. It is available in the Alpine Community repository.

  6. Install Satty via Cargo

    main

    You can install Satty using Rust's package managers. These methods install the binary to $HOME/.cargo/bin.

    • cargo install: Compiles from source.
    • cargo binstall: Downloads a prebuilt binary (requires cargo-binstall). Note that when using binstall, the manpage and LICENSE file are not installed to the system, but you can view them using the --man and --license arguments.
  7. Customize Satty with CSS

    main

    Satty uses minimal built-in CSS which can be overridden by creating a file at $XDG_CONFIG_HOME/satty/overrides.css.

    To discover styleable elements, run Satty with the environment variable GTK_DEBUG=interactive to open the GTK inspector.

    Example override for toolbar transparency:

    .outer_box,
    .toolbar {
        color: #000000;
        background-color: #ddddddaa;
    }
  8. Use Satty for screenshot annotation

    main

    To use Satty, provide a filename or a screenshot via stdin. You can then use various tools to annotate the image. Once finished, you can save the result to your clipboard or to a file.

    Configuration can be managed via the configuration file at XDG_CONFIG_DIR/.config/satty/config.toml or through command-line arguments. Command-line options take precedence over the configuration file.

  9. Configure Satty via config.toml

    main

    The Satty configuration file is located at XDG_CONFIG_DIR/.config/satty/config.toml. It uses TOML format and allows customizing almost all behaviors, including fullscreen mode, initial tools, output filenames, and keybindings.

    Example configuration structure:

    [general]
    fullscreen = false
    initial-tool = "brush"
    output-filename = "/tmp/test-%Y-%m-%d_%H:%M:%S.png"
    actions-on-enter = ["save-to-clipboard"]
    actions-on-escape = ["exit"]
    
    [keybinds]
    pointer = "p"
    brush = "b"
    
    [font]
    family = "Roboto"
    style = "Regular"
    
    [color-palette]
    palette = ["#f0932bff", "#eb4d4bff"]
    # Satty Configuration file
    [general]
    # Start Satty in fullscreen mode
    fullscreen = false
    # fullscreen = true
    # 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 right-click-copy 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 = 1.0
    # experimental feature (0.21.0): set window title
    title = "Satty"
    # experimental feature (0.21.0): set app_id, note that 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 that 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.
    # An installed color emoji font (e.g. Noto Color Emoji) is picked up automatically
    # as the last fallback, so emoji render without extra configuration. (NEXTRELEASE)
    fallback = [
        "Noto Sans CJK SC",
        # "Noto Sans CJK JP",
        # "Noto Sans CJK TC",
        # "Noto Sans CJK KR",
        # "Noto Serif CJK JP",
        # "Noto Serif JP",
        # "IPAGothic",
        # "IPAexGothic",
        # "Source Han Sans",
        # add or remove as needed may make satty slower
    ]
    
    # Custom colours for the colour palette
    [color-palette]
    # These will be shown in the toolbar for quick selection
    palette = [
        # RRGGBBAA format, where AA is the alpha channel 
        # (00 is fully transparent, ff is fully opaque)
        "#f0932bff",
        "#eb4d4bff",
        "#6ab04cff",
        "#22a6b3ff",
        "#130f40FF",
        # add or remove as needed
    ]
    
    # These will be available in the color picker as presets
    # Leave empty to use GTK's default
    custom = [
        # "#a52a2a",
        # "#ffd700",
        # "#008000",
        # add or remove as needed
    ]
  10. Highlighter modes and switching

    main

    Satty supports two types of highlighting: Block and Freehand.

    • Block: Creates rectangular highlighted areas.
    • Freehand: Allows drawing custom shapes with a path of points.

    The mode used depends on your primary_highlighter configuration. You can toggle to the alternative mode while drawing by holding the CTRL key when starting a highlight.

    In Freehand mode, holding SHIFT enables snapping to 15-degree increments for straight lines. Releasing SHIFT adds an extra point to the path, allowing for sharper turns without moving the mouse.

  11. Use the Text tool for annotations

    main

    The TextTool allows users to add editable text annotations to screenshots. It supports standard text editing features including undo/redo (via the underlying TextBuffer), cursor movement, text selection, and IME (Input Method Editor) for complex character input.

    Key Features

    • Text Effects: Users can cycle through decorative text effects (None, Inverted, Contrast, Shadow) by tapping the Alt key.
    • Editing Lifecycle: Text is created in an editing state. Pressing Return commits the text and finishes the tool session, while Shift + Return inserts a newline. Pressing Escape cancels the current text entry.
    • Styling: The text inherits styling (color, etc.) from the active Style configuration.