diff --git a/screenshot.sh b/screenshot.sh index 73101b0..e9d5514 100755 --- a/screenshot.sh +++ b/screenshot.sh @@ -1,6 +1,7 @@ #!/bin/sh -# Simple screenshot script with selection using maim. +# Screenshot script with selection using maim and notification. filepath="$HOME/media/images/screenshots/$(date +%Y-%m-%d\ %H:%M:%S).png" - maim --select --hidecursor | tee "$filepath" | xclip -selection clipboard -target image/png -notify-send --icon "$filepath" "$0" "Screenshot saved to: $filepath" + +# send notification with a thumbnail of the screenshot taken, the name of the script, and the filepath +notify-send --icon "$filepath" "$(echo "$0" | awk -F '/' '{print $NF}')" "Screenshot saved to: $filepath"