aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts
diff options
context:
space:
mode:
authorKKV9 <ciaranob.cob@gmail.com>2024-02-05 02:00:39 +0000
committerKKV9 <ciaranob.cob@gmail.com>2024-02-05 02:00:39 +0000
commit69f1e8eaafe756421ca47c7c414b7ddfeb6f7f43 (patch)
tree83d9e230c2f3aac491c93e9e9a2ef10d30a307d5 /config/hypr/scripts
parentde8e288d1a41351a1945549f3cfe8ea1d356199c (diff)
Fix: Area screenshot saving empty files
Area screenshot saves a file on exit and no area has been selected.
Diffstat (limited to 'config/hypr/scripts')
-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