screenshot: fix action separator and add Pictures dir guard

This commit is contained in:
funman300
2026-04-28 11:28:50 -07:00
parent b2c2f2d394
commit d923cfb5cf
+3 -1
View File
@@ -2,6 +2,8 @@
FILE="$HOME/Pictures/screenshot-$(date +%s).png" FILE="$HOME/Pictures/screenshot-$(date +%s).png"
mkdir -p "$HOME/Pictures"
# Exit silently if the user cancels region selection # Exit silently if the user cancels region selection
if ! grim -g "$(slurp)" "$FILE"; then if ! grim -g "$(slurp)" "$FILE"; then
exit 0 exit 0
@@ -13,7 +15,7 @@ action=$(notify-send "Screenshot captured" \
"Saved · Copied to clipboard" \ "Saved · Copied to clipboard" \
--hint="string:image-path:$FILE" \ --hint="string:image-path:$FILE" \
--expire-time=10000 \ --expire-time=10000 \
--action="actions=Actions") --action="actions:Actions")
[[ "$action" != "actions" ]] && exit 0 [[ "$action" != "actions" ]] && exit 0