diff options
| author | Robert Günzler <r@gnzler.io> | 2026-04-08 13:24:01 +0900 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-04-08 13:24:01 +0900 |
| commit | 28db7c76e26c312918959384e02e433f8858de49 (patch) | |
| tree | cc06c8ffa2444b49cbaf01d45aede08411d23049 /bin/grimshot | |
| parent | b61b58ce2c1371d6f904f108fa7feed3abfbe5c7 (diff) | |
*
Automated-commit-by: dots Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'bin/grimshot')
| -rwxr-xr-x | bin/grimshot | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/grimshot b/bin/grimshot new file mode 100755 index 0000000..b946c27 --- /dev/null +++ b/bin/grimshot @@ -0,0 +1,15 @@ +#!/bin/sh +set -eu + +screenshot_dir=$XDG_PICTURES_DIR/screenshots +screenshot_path=$screenshot_dir/"$(date --iso-8601=seconds).png" + +mkdir -p $screenshot_dir || exit 1 + +grim -g "$(slurp)" "$screenshot_path" || exit 1 + +wl-copy --type image/png < "$screenshot_path" || exit 1 + +wl-copy --primary "$screenshot_path" || exit 1 + +fyi -a grimshot -i "$screenshot_path" "grimshot" "$screenshot_path" |