1SWAYGRAB(1) SWAYGRAB(1)
2
3
4
6 swaygrab - Grab image data from the current sway session.
7
9 swaygrab [options] [file]
10
11 Grabs pixels from an output and writes them to file. The image will be
12 passed to ImageMagick convert for processing.
13
15 -h, --help
16 Show help message and quit.
17
18 -c, --capture
19 Captures multiple frames as video and passes them into ffmpeg.
20 Continues until you send SIGTERM (ctrl+c) to swaygrab.
21
22 -o, --output <output>
23 Use the specified output. If no output is defined the currently
24 focused output in sway will be used.
25
26 -v, --version
27 Print the version (of swaymsg) and quit.
28
29 -s, --socket <path>
30 Use the specified socket path. Otherwise, swaymsg will ask sway
31 where the socket is (which is the value of $SWAYSOCK, then of
32 $I3SOCK).
33
34 -R, --rate <rate>
35 Specify a framerate (in frames per second). Used in combination
36 with -c. Default is 30. Must be an integer.
37
38 -r, --raw
39 Instead of invoking ImageMagick or ffmpeg, dump raw rgba data to
40 stdout.
41
42 -f, --focused
43 Capture only the currently focused container.
44
46 swaygrab reads the following environment variables.
47
48 SWAYGRAB_FFMPEG_OPTS
49 Pass additional arguments to FFmpeg when starting a capture.
50
52 swaygrab output.png
53 Grab the contents of currently focused output and write to
54 output.png.
55
56 swaygrab -c -o HDMI-A-1 output.webm
57 Capture a webm of HDMI-A-1.
58
59 SWAYGRAB_FFMPEG_OPTS="-f alsa -i pulse" swaygrab -c
60 Capture the focused output and encode audio from the default
61 recording device.
62
64 Maintained by Drew DeVault <sir@cmpwn.com>, who is assisted by other
65 open source contributors. For more information about sway development,
66 see https://github.com/swaywm/sway.
67
68
69
70 02/07/2019 SWAYGRAB(1)