diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2025-01-12 15:51:06 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2025-01-12 15:51:06 +0900 |
| commit | df6c626e613838ded886bd33ea4c7f7fb0882cd7 (patch) | |
| tree | af58e71fde879351989ddc7bae43cd7fde88b214 /config | |
| parent | 4b9bc025cd56dac3acd0d480d39760d13ace5617 (diff) | |
improved swappy
Diffstat (limited to 'config')
| -rwxr-xr-x | config/hypr/scripts/ScreenShot.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index 7cc28afc..2089c033 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/config/hypr/scripts/ScreenShot.sh @@ -39,7 +39,15 @@ notify_view() { elif [[ "$1" == "swappy" ]]; then "${sDIR}/Sounds.sh" --screenshot - ${notify_swappy} "Screenshot Captured (swappy)" + resp=$(${notify_cmd_shot} "Screenshot Captured (swappy)") + case "$resp" in + action1) + swappy -f - <"$tmpfile" + ;; + action2) + rm "$tmpfile" + ;; + esac else local check_file="${dir}/${file}" @@ -82,7 +90,7 @@ shot5() { countdown '5' sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy sleep 1 - notify_view + notify_view } shot10() { @@ -121,8 +129,6 @@ shotactive() { shotswappy() { tmpfile=$(mktemp) grim -g "$(slurp)" - >"$tmpfile" && notify_view "swappy" - swappy -f - <"$tmpfile" - rm "$tmpfile" } if [[ ! -d "$dir" ]]; then @@ -147,4 +153,4 @@ else echo -e "Available Options : --now --in5 --in10 --win --area --active --swappy" fi -exit 0 +exit 0
\ No newline at end of file |
