Skip to content

Config

The search order for configuration files is:

  • builtin
  • system wide config ($XDG_CONFIG_DIRS/satty/config.toml, usually /etc/xdg/satty/config.toml) if present NEXTRELEASE
  • user config ($XDG_CONFIG_HOME/satty/config.toml, usually $HOME/.config/satty/config.toml) if present
  • config specified in command line, if any. Please note: in this case Satty ignores the former two files, and a file not found error on the given config file becomes fatal
  • command line options

This is an example config. Please note, we're not pointing out defaults everywhere yet, it is a WIP.

config.toml
[general]
# 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"

# 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
# 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
# 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 (0.22.0): show thumbnail as notification icon
# notification-thumbnail = "app-icon"
notification-thumbnail = "screenshot"
# how long we are waiting after notification thumbnail was sent before exiting (exit early or quit). This is based on the temporary file mtime.
# for fast machines, the default value of 250ms is ridiculously high.
notification-grace-period = 250
# Disable notifications
disable-notifications = 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

# Change to true to automatically copy to clipboard after every annotation change (0.21.0)
auto-copy = false
# Configure the command to be called on copy, for example `wl-copy`
copy-command = "wl-copy"
# After copying the screenshot, save it to a file as well
save-after-copy = false

# Filename to use for saving action. Omit to be asked via the save-as dialog on first save; the chosen file is then reused for later saves. 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 = "~/Pictures/Screenshots/screenshot-%Y-%m-%d_%H:%M:%S.png"

# Select the tool on startup [possible values: see `satty --help`]
initial-tool = "brush"
# Change to true to automatically select newly created annotation (NEXTRELEASE)
auto-select-new = false
# The primary highlighter to use, the other is accessible by holding CTRL at the start of a highlight [possible values: block, freehand], deprecated since NEXTRELEASE
primary-highlighter = "block"
# Aspect ratios used when holding Shift while drawing - also matches inverse aspect ratios
aspect-ratios = [[1, 1], [1, 2], [5, 4], [4, 3], [7, 5], [3, 2], [16, 9]]
# Scale the sizes of the tools using line widths or font sizes (pen, brush, highlighter,
# line, arrow, rectangle, ellipse, text, marker), applied once at startup (changed in NEXTRELEASE)
annotation-size-factor = 1
# experimental feature: adjust history size for brush input smoothing (0: disabled, default: 0, try e.g. 5 or 10)
brush-smooth-history-size = 10

# 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: see `satty --help`]
# Deprecated since 0.19.0: use actions-on-enter instead
action-on-enter = "save-to-clipboard"
# Right click to copy
# Deprecated since 0.19.0: use actions-on-right-click instead
right-click-copy = false

# 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

# Styles of the tools (NEXTRELEASE)
# corner-roundness (now corner-radius), default-fill-shapes and default-round-caps
# from [general] were replaced by this section.
# The shared style, used for all values not set for a tool
[style]
# 1-based index into the color palette or a color in RRGGBBAA format like "#f0932bff"
color = 1
# The size is a value from 0 to 999 with one decimal place, its meaning depends on the tool.
# Here it is the line width of pen, brush, line, arrow, rectangle and ellipse.
size = 5
# Sizes of the S, M and L buttons and select-size shortcuts
small = 3
medium = 5
large = 7
# Fill shapes
fill = false
# Round caps for lines and arrows, round corners for rectangles
round-caps = true
# Radius of rounded corners in pixels, used with round-caps (0 disables rounded corners)
corner-radius = 12
# Opacity in percent, multiplied with the alpha of the color
opacity = 100

# Styles per tool, tables are named like the tools in [keybinds] and accept the same keys as [style].
# Tools below come with their own sizes, the shared sizes do not apply to them.
# If size is not set, it is the medium size.

# width
[style.highlighter]
small = 15
medium = 30
large = 45
opacity = 40

# font size
# fill and round-caps select the effect: none (false, true), inverted outline (true, false),
# contrast outline (true, true), drop shadow (false, false)
# opacity is the one of a background in the contrast color, 0 means no background
[style.text]
small = 36
medium = 54
large = 96
fill = false
round-caps = true
opacity = 0

[style.marker]
small = 36
medium = 54
large = 96

# block size
[style.pixelate]
small = 4
medium = 8
large = 16

[style.fringe-pixelate]
small = 4
medium = 8
large = 16

# blur strength (at least 1)
# fill draws a rectangle instead of an ellipse
[style.blur]
small = 4
medium = 8
large = 16
fill = true

[style.lensblur]
small = 4
medium = 8
large = 16
fill = false

# opacity in percent, at least 20 for the block highlighter and 25 for the spotlight
[style.highlight]
small = 40
medium = 60
large = 80
fill = true

[style.spotlight]
small = 40
medium = 60
large = 80
fill = false

[style.blackout]
color = "#000000ff"
fill = true

# Other tools can be configured as well, e.g.
# [style.arrow]
# color = 2
# size = 7
#
# [style.rectangle]
# corner-radius = 0

# Generic keyboard shortcuts (NEXTRELEASE)
[keybinds]
# "<Control>q" = "run-actions-on-escape" # additionally to Escape
# "i" = "none" # unbind "i" default for line
# "l" = "line"

# Global
"<Shift><Control>d" = "open-gtk-inspector"
"<Shift><Control>i" = "open-gtk-inspector"
"<Alt>Left" = "pan-left"
"<Alt>Right" = "pan-right"
"<Alt>Up" = "pan-up"
"<Alt>Down" = "pan-down"
"<Control>plus" = "zoom:1"
"<Control>equal" = "zoom:1"
"<Control>minus" = "zoom:-1"
"Delete" = "delete-selection"
"<Alt>Page_Up" = "raise-selection"
"<Alt>Page_Down" = "lower-selection"
"Escape" = "run-actions-on-escape"
"Return" = "run-actions-on-enter"
"KP_Enter" = "run-actions-on-enter"
"<Control>t" = "toggle-toolbars"

# scale is in %, 0 is fit to window
"<Alt>2" = "scale:50"
"<Alt>3" = "scale:33"
"<Alt>4" = "scale:25"
"<Control>2" = "scale:200"
"<Control>3" = "scale:300"
"<Control>4" = "scale:400"

# top toolbar
"<Alt>1" = "scale:100"
"<Control>1" = "scale:0"
"<Shift>Delete" = "clear-all"
"<Control>z" = "undo"
"<Control>y" = "redo"

"v" = "pointer"
"c" = "crop"
"p" = "pen"
"h" = "highlighter"
"b" = "brush"
"i" = "line"
"z" = "arrow"
"r" = "rectangle"
"e" = "ellipse"
"t" = "text"
"m" = "marker"
"x" = "fringe-pixelate"
"u" = "blur"
"<Shift>x" = "blackout"
"g" = "highlight"
"s" = "spotlight"
"<Shift>u" = "lensblur"
"o" = "image"

"<Control>s" = "save-to-file"
"<Shift><Control>s" = "save-to-file-as"
"<Control>c" = "save-to-clipboard"
"<Control><Alt>c" = "copy-filepath-to-clipboard"
"<Control>v" = "paste-image"

# bottom toolbar
"1" = "select-color-index:1"
"2" = "select-color-index:2"
"3" = "select-color-index:3"
"4" = "select-color-index:4"
"5" = "select-color-index:5"
"6" = "select-color-index:6"
"7" = "select-color-index:7"
"8" = "select-color-index:8"
"9" = "select-color-index:9"
"0" = "select-color-index:10"
"minus" = "cycle-size"
#"..." = "select-size:(small|medium|large)"
"w" = "focus-size"
"f" = "toggle-fill"
"k" = "toggle-round-caps"

# 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.
# An installed color emoji font (e.g. Noto Color Emoji) is picked up automatically
# as the last fallback, so emoji render without extra configuration. (0.22.0)
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 - more fonts 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
]