From 227fd0213400580cd3d5627c1097c57904290382 Mon Sep 17 00:00:00 2001 From: Dolbaeb777K <126266582+Dolbaeb777K@users.noreply.github.com> Date: Fri, 21 Mar 2025 21:29:46 +0700 Subject: Update ScreenShot.sh shotswappy learned to copy! --- config/hypr/scripts/ScreenShot.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index 852be4b0..ff477766 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/config/hypr/scripts/ScreenShot.sh @@ -109,6 +109,8 @@ shotwin() { shotarea() { tmpfile=$(mktemp) grim -g "$(slurp)" - >"$tmpfile" + + # Copy with saving if [[ -s "$tmpfile" ]]; then wl-copy <"$tmpfile" mv "$tmpfile" "$dir/$file" @@ -128,7 +130,13 @@ shotactive() { shotswappy() { tmpfile=$(mktemp) - grim -g "$(slurp)" - >"$tmpfile" && notify_view "swappy" + grim -g "$(slurp)" - >"$tmpfile" + + # Copy without saving + if [[ -s "$tmpfile" ]]; then + wl-copy <"$tmpfile" + notify_view "swappy" + fi } if [[ ! -d "$dir" ]]; then @@ -153,4 +161,4 @@ else echo -e "Available Options : --now --in5 --in10 --win --area --active --swappy" fi -exit 0 \ No newline at end of file +exit 0 -- cgit v1.2.3