diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2025-03-24 14:22:56 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-24 14:22:56 +0900 |
| commit | a3c975e70db5a914646cd58d58062193d025cb1b (patch) | |
| tree | 733159945f72b385944499dbae5977afc792f300 /config/hypr/scripts/ScreenShot.sh | |
| parent | c1f0fc471b082f59aae939c3343312e09320ca36 (diff) | |
| parent | 093e599a3411eaf3db6ebee31b8c91f8bc9e2faf (diff) | |
Merge pull request #645 from JaKooLit/development
Development to main
Diffstat (limited to 'config/hypr/scripts/ScreenShot.sh')
| -rwxr-xr-x | config/hypr/scripts/ScreenShot.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index 852be4b0..90e2dfd2 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/config/hypr/scripts/ScreenShot.sh @@ -18,7 +18,7 @@ active_window_path="${dir}/${active_window_file}" notify_cmd_base="notify-send -t 10000 -A action1=Open -A action2=Delete -h string:x-canonical-private-synchronous:shot-notify" notify_cmd_shot="${notify_cmd_base} -i ${iDIR}/picture.png " notify_cmd_shot_win="${notify_cmd_base} -i ${iDIR}/picture.png " -notify_cmd_NOT="notify-send -u low -i ${iDoR}/ja.png " +notify_cmd_NOT="notify-send -u low -i ${iDoR}/note.png " # notify and view screenshot notify_view() { @@ -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 |
