|  | 
| 1 |  | -guzzle | 
| 2 |  | -====== | 
|  | 1 | +guzzle 💦 | 
|  | 2 | +========= | 
|  | 3 | + | 
|  | 4 | +guzzle is a Wayland screen capture CLI tool. | 
|  | 5 | + | 
|  | 6 | +guzzle does not try to do any of these things: | 
|  | 7 | +- support X11 | 
|  | 8 | +- capture anything other than pixels from a screen | 
|  | 9 | +- have a GUI | 
|  | 10 | + | 
|  | 11 | +## Usage | 
|  | 12 | + | 
|  | 13 | +``` | 
|  | 14 | +guzzle [sink] [selection] [capture] | 
|  | 15 | +``` | 
|  | 16 | +`sink` can be one of: | 
|  | 17 | +- `copy` - copy the contents to the clipboard (default) | 
|  | 18 | +- `save` - save the contents to a file (default if `--file` is present) | 
|  | 19 | +- `print` - print the contents to stdout | 
|  | 20 | + | 
|  | 21 | +The output filename for `save` is the current date and time, unless the `--file` argument is given. | 
|  | 22 | + | 
|  | 23 | +The `--file` argument can also be given for other `sink` options, in which case a file will be saved in addition to the specified action. | 
|  | 24 | + | 
|  | 25 | +`selection` can be one of: | 
|  | 26 | +- `area` - select a region | 
|  | 27 | +- `window` - select a visible window | 
|  | 28 | +- `output` - select a visible display output / monitor | 
|  | 29 | +- `screen` - all visible outputs | 
|  | 30 | +- `anything` - select a region, window, or output (default) | 
|  | 31 | + | 
|  | 32 | +Selections can be saved and reused with the `--area-name` arguments. When an area name is first used, the user will have to make a selection. On subsequent uses, the saved area will be used automatically. | 
|  | 33 | + | 
|  | 34 | +`capture` can be one of: | 
|  | 35 | +- `screenshot` - make a screenshot of the selected region (default) | 
|  | 36 | +- `video` - record a video of the selected region | 
|  | 37 | + | 
|  | 38 | +Capture can be delayed with the `--delay` argument, which accepts the number of seconds to wait for your make-up crew to finish. | 
|  | 39 | + | 
|  | 40 | +The duration of video recordings can be specified with the `--duration` argument, which accepts the number of seconds for the recording. | 
|  | 41 | + | 
|  | 42 | +### Examples | 
|  | 43 | + | 
|  | 44 | +``` | 
|  | 45 | +guzzle copy window --file=browser.png --area-name=browser | 
|  | 46 | +``` | 
|  | 47 | +- The user is prompted to select a visible window on the screen. | 
|  | 48 | +- The image of the window will be copied to the clipboard and also saved to the file `browser.png`. | 
|  | 49 | +- The area currently occupied by the window will be stored and reused on later invocations with `--area-name=browser`. | 
|  | 50 | + | 
|  | 51 | +## Requirements | 
|  | 52 | + | 
|  | 53 | +guzzle looks for the following programs on the `PATH`: | 
|  | 54 | +- `slurp` (the original inspiration for this project's name) | 
|  | 55 | +- `grim` | 
|  | 56 | +- `wl-recorder` | 
|  | 57 | +- `wl-copy` | 
|  | 58 | + | 
|  | 59 | +You don't have to worry about any of that if you use Nix. | 
|  | 60 | + | 
|  | 61 | +### Window managers | 
|  | 62 | + | 
|  | 63 | +guzzle talks to window manager APIs to get window and monitor regions. | 
|  | 64 | + | 
|  | 65 | +The currently supported window managers are | 
|  | 66 | +- Sway | 
|  | 67 | +- Hyprland | 
|  | 68 | +- anything else you, the helpful reader, will contribute in PRs :-) | 
0 commit comments