aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJa.KooLit <jimmielovejay@gmail.com>2024-02-14 05:23:14 +0900
committerGitHub <noreply@github.com>2024-02-14 05:23:14 +0900
commitaf8626d4ce57a1e5e21d79a6a4217ae2a6f8bdb6 (patch)
tree83d9e230c2f3aac491c93e9e9a2ef10d30a307d5
parente34165295e0856f9f14fffb4e323fb1f2e2220c9 (diff)
parent69f1e8eaafe756421ca47c7c414b7ddfeb6f7f43 (diff)
Merge pull request #153 from KKV9/development
Fix: Area screenshot saving empty files
-rwxr-xr-xconfig/hypr/scripts/ScreenShot.sh8
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
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage