[screenshot.sh]: Rename screenshot.sh => x11_screenshot.sh

This commit is contained in:
2024-11-19 15:22:37 +00:00
parent c001a1c26e
commit f4612c1e9d
2 changed files with 2 additions and 2 deletions

12
x11_screenshot.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
# 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
# if maim is cancelled, tee will create an empty file, so checking if the file is empty
if [ -s "$filepath" ]; then
# send notification with a thumbnail of the screenshot taken, the name of the script, and the filepath
notify-send --icon "$filepath" "$(basename "$0")" "Screenshot saved to: $filepath"
else
rm "$filepath"
fi