swappy/README.md
2019-12-27 19:56:05 -05:00

1.2 KiB

swappy

A Wayland native snapshot tool, inspired by Snappy on macOS. Works great with slurp and sway.

Code was largely inspired by grim.

Example usage

Swappshot a region:

swappy -g "100,100 200x200"

Select a region and swappshot it:

swappy -g "$(slurp)"

Grab a swappshot from a specific window under Sway, using swaymsg and jq:

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 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:

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