From 1ea719841ab97bca1d68a6d38b2b6894757e800a Mon Sep 17 00:00:00 2001 From: Shinyzenith Date: Wed, 20 Jul 2022 19:29:36 +0530 Subject: [PATCH] [docs/readme] color picker example Signed-off-by: Shinyzenith --- README.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 08e79d58..660b2a68 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@

wayshot

A native, blazing-fast 🚀🚀🚀 screenshot tool for wlroots based compositors such as sway and river written in Rust.

- +

- + @@ -45,6 +45,12 @@ 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 hex color code without using ImageMagick: + +```bash +wayshot -s "$(slurp -p -f '%x %y %w %h')" --stdout -e ppm | tail -c 3 | od -An -tuC | xargs printf '#%02X%02X%02X\n' +``` + Pick a color, using ImageMagick: ```bash @@ -63,15 +69,15 @@ Multi monitor systems break on `--slurp` usage. This is quite the tricky bug and ## Compile time dependencies: -- rustup -- make +- rustup +- make ## Compiling: -- `git clone https://github.com/waycrate/wayshot && cd wayshot` -- `make setup` -- `make` -- `sudo make install` +- `git clone https://github.com/waycrate/wayshot && cd wayshot` +- `make setup` +- `make` +- `sudo make install` # Support: