A native screenshot tool for wlroots based compositors such as sway and river written in Rust. X11 support coming soon.
Usage:
Region Selection:
wayshot -s "$(slurp -f '%x %y %w %h')"
Fullscreen:
wayshot
Custom file path:
wayshot -f ../screenshot.png --extension jpg
Screenshot and copy to clipboard:
wayshot --stdout | wl-copy
Pick a hex color code, using ImageMagick:
wayshot -s "$(slurp -p -f '%x %y %w %h')" --stdout | convert - -format '%[pixel:p{0,0}]' txt:-|egrep "#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})" -o
Pick a color, using ImageMagick:
wayshot -s "$(slurp -p -f '%x %y %w %h')" --stdout | convert - -format '%[pixel:p{0,0}]' txt:-
Known bugs:
Multi monitor systems break on --slurp
usage. This is quite the tricky bug and will need some refactoring which we're currently working on. (#7)
Installation
AUR:
wayshot-git
& wayshot-bin
have been packaged.
OpenSuse Tumbleweed:
As root:
zypper addrepo https://download.opensuse.org/repositories/X11:Wayland/openSUSE_Tumbleweed/X11:Wayland.repo
zypper refresh
zypper install wayshot
Compile time dependencies:
- rustup
- make
Compiling:
git clone https://github.com/waycrate/wayshot && cd wayshot
make setup
make
sudo make install
Support:
Smithay Developers:
Massive thanks to smithay developer Cmeissl and Victor Berger. Without them this project won't be possible as my wayland knowledge is limited.