screenshot: fix action separator and add Pictures dir guard
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
FILE="$HOME/Pictures/screenshot-$(date +%s).png"
|
||||
|
||||
mkdir -p "$HOME/Pictures"
|
||||
|
||||
# Exit silently if the user cancels region selection
|
||||
if ! grim -g "$(slurp)" "$FILE"; then
|
||||
exit 0
|
||||
@@ -13,7 +15,7 @@ action=$(notify-send "Screenshot captured" \
|
||||
"Saved · Copied to clipboard" \
|
||||
--hint="string:image-path:$FILE" \
|
||||
--expire-time=10000 \
|
||||
--action="actions=Actions")
|
||||
--action="actions:Actions")
|
||||
|
||||
[[ "$action" != "actions" ]] && exit 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user