mirror of
https://github.com/jtheoof/swappy.git
synced 2024-09-11 14:55:49 +03:00
docs(swappy): add man and readme
This commit is contained in:
parent
8abc5d52ec
commit
08787f3136
66
README.md
66
README.md
@ -1,11 +1,69 @@
|
|||||||
# swappy
|
# swappy
|
||||||
|
|
||||||
A Wayland native snapshot tool, inspired by Snappy on macOS
|
A Wayland native snapshot tool, inspired by Snappy on macOS. Works great with [slurp] and [sway].
|
||||||
|
|
||||||
## Configuration
|
Code was largely inspired by [grim].
|
||||||
|
|
||||||
If you are using [Sway](https://github.com/swaywm/sway), it is recommended to set Swappy as a floating window. To do this, add the following line to your sway config file:
|
## Example usage
|
||||||
|
|
||||||
|
Swappshot a region:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
swappy -g "100,100 200x200"
|
||||||
```
|
```
|
||||||
for_window [app_id="swappy"] floating enable
|
|
||||||
|
Select a region and swappshot it:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
swappy -g "$(slurp)"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Grab a swappshot from a specific window under Sway, using `swaymsg` and `jq`:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
swappy -g "$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp)"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Package manager installation
|
||||||
|
|
||||||
|
### Arch Linux User Repository
|
||||||
|
|
||||||
|
Assuming [yay](https://aur.archlinux.org/packages/yay/) as your AUR package manager.
|
||||||
|
|
||||||
|
* stable version: `yay -S swappy`
|
||||||
|
* git version: `yay -S swappy-git`
|
||||||
|
|
||||||
|
## Building from source
|
||||||
|
|
||||||
|
Install dependencies:
|
||||||
|
|
||||||
|
* meson
|
||||||
|
* wayland
|
||||||
|
* cairo
|
||||||
|
* gtk
|
||||||
|
|
||||||
|
Optional dependencies:
|
||||||
|
|
||||||
|
* libnotify
|
||||||
|
|
||||||
|
Then run:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
meson build
|
||||||
|
ninja -C build
|
||||||
|
```
|
||||||
|
|
||||||
|
To run directly, use `build/swappy`, or if you would like to do a system
|
||||||
|
installation (in `/usr/local` by default), run `ninja -C build install`.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Pull requests are welcome.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT
|
||||||
|
|
||||||
|
[slurp]: https://github.com/emersion/slurp
|
||||||
|
[grim]: https://github.com/emersion/grim
|
||||||
|
[sway]: https://github.com/swaywm/sway
|
||||||
|
34
swappy.1.scd
34
swappy.1.scd
@ -0,0 +1,34 @@
|
|||||||
|
swappy(1)
|
||||||
|
|
||||||
|
# NAME
|
||||||
|
|
||||||
|
swappy - grab and edit on the fly snapshots of a Wayland compositor, inspired by Snappy on macOS
|
||||||
|
|
||||||
|
# DESCRIPTION
|
||||||
|
|
||||||
|
*swappy* [options...]
|
||||||
|
|
||||||
|
# SYNOPSIS
|
||||||
|
|
||||||
|
swappy is a command-line utility to take and edit screenshots of Wayland desktops. For now
|
||||||
|
it requires support for the screencopy protocol to work. Support for the
|
||||||
|
xdg-output protocol is optional, but improves fractional scaling support.
|
||||||
|
|
||||||
|
swappy will save the swappshot images to a timestamped file name in
|
||||||
|
*$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*.
|
||||||
|
|
||||||
|
# OPTIONS
|
||||||
|
|
||||||
|
*-h*
|
||||||
|
Show help message and quit.
|
||||||
|
|
||||||
|
*-g* "<x>,<y> <width>x<height>"
|
||||||
|
Set the region to capture, in layout coordinates.
|
||||||
|
|
||||||
|
This is slurp friendly.
|
||||||
|
|
||||||
|
# AUTHORS
|
||||||
|
|
||||||
|
Written and maintained by Jeremy Attali <jeremy.attali@gmail.com>. See
|
||||||
|
https://github.com/jtheoof/swappy.
|
Loading…
Reference in New Issue
Block a user