diff options
| author | Ja.KooLit <jimmielovejay@gmail.com> | 2024-02-14 05:23:14 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-14 05:23:14 +0900 |
| commit | af8626d4ce57a1e5e21d79a6a4217ae2a6f8bdb6 (patch) | |
| tree | 83d9e230c2f3aac491c93e9e9a2ef10d30a307d5 /config/hypr/scripts | |
| parent | e34165295e0856f9f14fffb4e323fb1f2e2220c9 (diff) | |
| parent | 69f1e8eaafe756421ca47c7c414b7ddfeb6f7f43 (diff) | |
Merge pull request #153 from KKV9/development
Fix: Area screenshot saving empty files
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/ScreenShot.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index fa1b40ad..f35f9292 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/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 } |
