diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2025-03-22 00:01:24 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-22 00:01:24 +0900 |
| commit | 910e350fd0eaecaf274694695d38879d2d5c0727 (patch) | |
| tree | 1fe566a1f31ccd3445d66448fe1bb2c083c221cd /config/hypr/scripts | |
| parent | 1c19a5e7a906709761b21961ff1201ab45c1f89d (diff) | |
| parent | 227fd0213400580cd3d5627c1097c57904290382 (diff) | |
Merge pull request #641 from Dolbaeb777K/main
shotswappy has now learned copy!
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/ScreenShot.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index b0f666aa..90e2dfd2 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 |
