Browse Source

Fix: Area screenshot saving empty files

Area screenshot saves a file on exit and no area has been selected.
pull/153/head
KKV9 2 years ago
parent
commit
69f1e8eaaf
  1. 8
      config/hypr/scripts/ScreenShot.sh

8
config/hypr/scripts/ScreenShot.sh

@ -75,7 +75,13 @@ shotwin() {
}
shotarea() {
cd ${dir} && grim -g "$(slurp)" - | tee "$file" | wl-copy
tmpfile=$(mktemp)
grim -g "$(slurp)" - >"$tmpfile"
if [[ -s "$tmpfile" ]]; then
wl-copy <"$tmpfile"
mv "$tmpfile" "$dir/$file"
fi
rm "$tmpfile"
notify_view
}

Loading…
Cancel
Save