2019-12-28 03:56:05 +03:00
swappy(1)
# NAME
2019-12-29 04:59:32 +03:00
swappy - grab and edit on the fly snapshots of a Wayland compositor
2019-12-28 03:56:05 +03:00
2020-07-08 04:32:44 +03:00
# SYNOPSIS
2019-12-28 03:56:05 +03:00
*swappy* [options...]
2020-07-08 04:32:44 +03:00
# DESCRIPTION
2019-12-28 03:56:05 +03:00
2020-01-04 23:33:37 +03:00
swappy is a command-line utility to take and edit screenshots of Wayland
2020-06-17 06:02:58 +03:00
desktops. Works great with grim, slurp and sway. But can easily work with
2021-02-18 07:58:30 +03:00
other screen copy tools that can output a final image to *stdout*.
2019-12-28 03:56:05 +03:00
2020-06-17 06:02:58 +03:00
swappy will save the annotated images to the config *save_dir*, see below.
2020-01-12 23:32:38 +03:00
If absent, then if it will try to default to a *Desktop* folder following this
pattern: *$XDG\_DESKTOP\_DIR*. If this variable is not set, it will revert to:
*$XDG\_CONFIG\_HOME/Desktop*. If *$XDG\_CONFIG\_HOME* is not set, it will revert
to: *$HOME/Desktop*.
2020-01-04 23:33:37 +03:00
# OPTIONS
2020-06-23 05:35:42 +03:00
*-h, --help*
2020-01-04 23:33:37 +03:00
Show help message and quit.
2020-06-23 05:35:42 +03:00
*-v, --version*
Show version and quit.
*-f, --file* <file>
2021-02-18 07:58:30 +03:00
An image file to load for editing.
2020-01-04 23:33:37 +03:00
If set to *-*, read the file from standard input instead. This is grim
friendly.
2019-12-28 03:56:05 +03:00
2020-01-20 02:09:15 +03:00
*-o, --output-file <file>*
Print the final surface to *<file>* when exiting the application.
2020-11-10 01:04:03 +03:00
2020-01-20 02:09:15 +03:00
If set to *-*, prints the final surface to *stdout*.
Note that the *Save* button will save the image to the config *save_dir*
2020-07-08 04:32:44 +03:00
parameter, as described in the DESCRIPTION section.
2020-01-20 02:09:15 +03:00
2020-01-12 23:32:38 +03:00
# CONFIG FILE
The config file is located at *$XDG\_CONFIG\_HOME/swappy/config* or at
*$HOME/.config/swappy/config*. The file follows the GLib *conf* format.
```
[Section]
key=value
```
The following lines can be used as swappy's default:
```
[Default]
save_dir=$HOME/Desktop
2020-11-10 01:04:03 +03:00
save_filename_format=swappy-%Y%m%d-%H%M%S.png
2020-06-18 05:54:47 +03:00
show_panel=false
2020-01-12 23:32:38 +03:00
line_size=5
text_size=20
text_font=sans-serif
2021-12-25 20:26:11 +03:00
paint_mode=brush
2022-07-31 13:04:54 +03:00
early_exit=false
2022-11-19 00:05:37 +03:00
fill_shape=false
2024-04-10 08:58:49 +03:00
auto_save=false
2024-10-29 03:18:20 +03:00
custom_color=rgba(192,125,17,1)
2020-01-12 23:32:38 +03:00
```
2021-12-25 20:26:11 +03:00
- *save_dir* is where swappshots will be saved, can contain env variables, when it does not exist, swappy attempts to create it first, but does not abort if directory creation fails
2020-11-10 01:04:03 +03:00
- *save_filename_format* is the filename template, if it contains a date format, this will be parsed into a timestamp. Format is detailed in strftime(3). If this date format is missing, filename will have no timestamp
2020-06-18 05:54:47 +03:00
- *show_panel* is used to toggle the paint panel on or off upon startup
2020-01-12 23:32:38 +03:00
- *line_size* is the default line size (must be between 1 and 50)
- *text_size* is the default text size (must be between 10 and 50)
- *text_font* is the font used to render text, its format is pango friendly
2021-12-25 20:26:11 +03:00
- *paint_mode* is the mode activated at application start (must be one of: brush|text|rectangle|ellipse|arrow|blur, matching is case-insensitive)
2022-07-31 13:04:54 +03:00
- *early_exit* is used to make the application exit after saving the picture or copying it to the clipboard
2022-11-19 00:05:37 +03:00
- *fill_shape* is used to toggle shape filling (for the rectangle and ellipsis tools) on or off upon startup
2024-10-26 03:35:29 +03:00
- *auto_save* is used to toggle auto saving of final buffer to *save_dir* upon exit
2024-10-31 20:39:36 +03:00
- *custom_color* is used to set a default value for the custom color. Accepted
formats are: standard name (one of: https://github.com/rgb-x/system/blob/master/root/etc/X11/rgb.txt), #rgb, #rrggbb, #rrrgggbbb, #rrrrggggbbbb, rgb(r,b,g), rgba(r,g,b,a)
2022-07-31 13:04:54 +03:00
2020-01-12 23:32:38 +03:00
2019-12-29 04:59:32 +03:00
# KEY BINDINGS
## LAYOUT
- *Ctrl+b*: Toggle Paint Panel
## PAINT MODE
- *b*: Switch to Brush
- *t*: Switch to Text
- *r*: Switch to Rectangle
- *o*: Switch to Ellipse
- *a*: Switch to Arrow
2020-05-31 06:18:58 +03:00
- *d*: Switch to Blur (d stands for droplet)
2019-12-29 04:59:32 +03:00
- *R*: Use Red Color
- *G*: Use Green Color
- *B*: Use Blue Color
- *C*: Use Custom Color
- *Minus*: Reduce Stroke Size
- *Plus*: Increase Stroke Size
- *Equal*: Reset Stroke Size
2022-11-19 00:05:37 +03:00
- *f*: Toggle Shape Filling
2019-12-29 04:59:32 +03:00
- *k*: Clear Paints (cannot be undone)
2021-02-21 04:53:24 +03:00
## MODIFIERS
- *Ctrl*: Center Shape (Rectangle & Ellipse) based on draw start
2019-12-29 04:59:32 +03:00
## HEADER BAR
- *Ctrl+z*: Undo
- *Ctrl+Shift+z* or *Ctrl+y*: Redo
2019-12-29 04:59:32 +03:00
- *Ctrl+s*: Save to file (see man page)
2019-12-29 04:59:32 +03:00
- *Ctrl+c*: Copy to clipboard
2020-01-20 02:09:15 +03:00
- *Escape* or *q* or *Ctrl+w*: Quit swappy
2019-12-29 04:59:32 +03:00
2019-12-28 03:56:05 +03:00
# AUTHORS
2019-12-29 04:59:32 +03:00
Written and maintained by jtheoof <contact@jtheoof.me>. See
2019-12-28 03:56:05 +03:00
https://github.com/jtheoof/swappy.