aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/ScreenShot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/scripts/ScreenShot.sh')
-rwxr-xr-xconfig/hypr/scripts/ScreenShot.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh
index fa1b40ad..d2ee51a2 100755
--- a/config/hypr/scripts/ScreenShot.sh
+++ b/config/hypr/scripts/ScreenShot.sh
@@ -1,9 +1,9 @@
#!/bin/bash
-## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Screenshots scripts
iDIR="$HOME/.config/swaync/icons"
-sDIR="$HOME/.config/hypr/UserScripts"
+sDIR="$HOME/.config/hypr/scripts"
notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png"
time=$(date "+%d-%b_%H-%M-%S")
@@ -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